Detect right and middle click

Place to get help with not working mods / modding interface.
Hermios
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Aug 13, 2016 2:57 pm
Contact:

Detect right and middle click

Post 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
matjojo
Filter Inserter
Filter Inserter
Posts: 338
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

Re: Detect right and middle click

Post 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.
Post Reply

Return to “Modding help”