Support drag to reorder for GUI Elements
Posted: Thu May 22, 2025 7:46 pm
There's a number of times people want to make a GUI with a fancy drag to reorder list, like replicating the train schedule menu for various other reasons.
I'm imagining it either being a new element like "reorderable-list" or maybe an argument like allow_reorder on the "scroll-pane", that lets the direct children be valid targets for drag_target.
This of course would need to come with at least one event, but I'm thinking two:
I'm imagining it either being a new element like "reorderable-list" or maybe an argument like allow_reorder on the "scroll-pane", that lets the direct children be valid targets for drag_target.
This of course would need to come with at least one event, but I'm thinking two:
-
on_gui_reorder_start - So mods can possibly collapse elements like the train schedule?- I was remembering behavior from an entirely different application. Feel no obligation to actually add this one. I was already thinking of plenty of problems with it and latency
- on_gui_reorder
_finish- Which contains a reference to the element moved, the initial index, and the new index