Fire on_gui_click on mouse up for empty-widgets, instead of mouse down

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Fire on_gui_click on mouse up for empty-widgets, instead of mouse down

Post by raiguard »

I am experimenting with reordering items in a list by dragging in a mod GUI, similar to the train GUI. I have a pretty good idea of how to go about it, but I need a reliable way of detecting when the drag ends. Buttons fire on_gui_click on mouse up, which would be perfect, but unfortunately empty-widgets do not do the same. And you can't set a drag_target on a button, so I can't use a button to facilitate the drag either.

If empty-widgets fired the event on mouse up, then I could simply use that to tell when the finished dragging.
Don't forget, you're here forever.

Post Reply

Return to “Modding interface requests”