Page 1 of 1

Detect right and middle click

Posted: Sun Jan 29, 2017 12:31 pm
by Hermios
Hi
I assume it has not been implemented yet.
Can you upgrade the event "gui_clicked", so that we can make a distinction between right, middle and left click. This already has been implemented in the core (When requiring stock from robots, right click on an item remove it), so it would be great to have this open.
By the way, a "on click" event would be great as well (Not only when clicking on a guielement, but as well by clicking on an entity).

Thanks

Niko

Re: Detect right and middle click

Posted: Sun Jan 29, 2017 6:16 pm
by matjojo
you could, make a hotkey event that fires on middle click, and then check if the on_gui_click event was within one or two ticks away from that one? you should test what the order is these get fired in and whether that is consistent. but it sounds do-able.