Make on_gui_click event return x/y offset inside the clicked element

Things that we aren't going to implement
Post Reply
User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

Make on_gui_click event return x/y offset inside the clicked element

Post by Godmave »

Use case:
- show a minimap/camera and allow the player to click it, deducing what the player wanted to click on our own.
- allow an interactive clusterio node map that is clickable to get more info on nodes and/or connect to them.

psihius
Fast Inserter
Fast Inserter
Posts: 192
Joined: Mon Dec 15, 2014 12:47 am
Contact:

Re: Make on_gui_click event return x/y offset inside the clicked element

Post by psihius »

At minimum we just want an X,Y coordinate of the click on the map. We can go from there with math :)

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Make on_gui_click event return x/y offset inside the clicked element

Post by Boodals »

I can't see x, y data being sent for all gui mouse clicks, as 99% of the time it would be unnecessary, but a special case for cameras might be okay. It should be in world coordinates though, not mouse position, as that would be much more useful. I also want a camera dragged event, so we can make cameras draggable like the map GUI, or it could be implemented as a flag on the camera and have it handled by the game.

Post Reply

Return to “Won't implement”