Page 1 of 1

Expose drag-and-drop list to Lua

Posted: Tue Nov 02, 2021 7:44 am
by curiosity
What I am asking for is for LuaGuiElement to support a rearrangeable list, like the one used by the game to display train schedule.

Re: Expose drag-and-drop list to Lua

Posted: Mon May 30, 2022 3:00 am
by asiomido
i too would like to see this

Re: Expose drag-and-drop list to Lua

Posted: Tue Jun 21, 2022 6:53 pm
by Rseding91
Unfortunately there is no generic drag-and-drop list. Every one you see in the base game is a custom implementation based off the way it needs to be used in that GUI.

Re: Expose drag-and-drop list to Lua

Posted: Thu Jun 23, 2022 6:30 am
by curiosity
Even exposing the train schedule list may be enough for some cases. Though, IMO, maybe not at the cost of having to maintain it for backward compatibility if/when a proper drag-and-drop list is added.

And then again, if there isn't one currently, doesn't mean there can't be one. Even when it will take some doing.

Re: Expose drag-and-drop list to Lua

Posted: Fri Jan 05, 2024 5:53 pm
by Cooldude2606
+1 for this request.

I am currently attempting to recreate the effect used for the toolbar shortcuts selection window.
But I had to compromise with "up/down" buttons because there is no way to drag an element within another.
I have seen other mods, such as factory planner, which have also required this compromise.

My best efforts

Re: Expose drag-and-drop list to Lua

Posted: Thu Nov 14, 2024 1:55 pm
by Sharparam
I want to revive this request since this is even more important now in 2.0.

I want to reimplement the logistic sections UI for my custom combinator, but to do that there has to be some way to implement the drag and drop mechanic.

I don't mind if it ends up needing a bunch of custom code, but we need some kind of API to make it possible.