Page 1 of 1

LuaGuiElement.drag_target for relative gui elements.

Posted: Fri Aug 13, 2021 8:30 pm
by eradicator
The circuit connector side-panel drag handle can be used to drag the main window, I would like to mimic this for modded side-panels. According to one of the FFFs the gui is being worked on again for "the addon", so maybe this could be shoved in somewhere? I'm not in a hurry.

WIP
WIP
draghandle.png (233.24 KiB) Viewed 742 times

Re: LuaGuiElement.drag_target for relative gui elements.

Posted: Mon Nov 13, 2023 11:05 am
by Deadlock989
+1

Relative GUIs can't drag the frame they are attached to because "the element needs to be a child of the drag_target at some level" and "only top-level elements in LuaGui::screen can be drag_targets". Relative GUIs aren't a child of gui.screen at all so they can't drag themselves, and I guess technically they are not a child of their anchor either so they can't drag the GUI they are attached to. But if the sidebar has a substantial header and you are following GUI style, it's weird for the player to try and drag a dragbar and not have it drag.