on_gui_click XOR custom_input ?

Place to get help with not working mods / modding interface.
Post Reply
apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

on_gui_click XOR custom_input ?

Post by apriori »

I've tried to cheat the impossibility of reacting differently to different mouse buttons.
naive cheat code
And found that these events exclude each other.
Are there any "cheats" to combine different keys? I remember that there is no straight way to find out key modifier.

And also, keys "SHIFT" and "CTRL" (alone) don't raise events. Is it normally?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: on_gui_click XOR custom_input ?

Post by aubergine18 »

As far as I can tell the modifier keys don't raise events on their own. As for detecting right-click, etc., on a GUI element, I don't think there's any way to do that currently (because we can't work out where the mouse is in relation to GUI). Hopefully the GUI updates that might come with 0.15 branch will yield improved GUI system.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Modding help”