ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   How to move ui.xml (https://www.esoui.com/forums/showthread.php?t=10497)

Shuba00 03/20/23 05:03 PM

How to move ui.xml
 
how can i make my ui movable and resizeble?

Baertram 03/20/23 05:12 PM

Check the Wiki for tutorials please, they include movable XML TopLevelControls too.
https://wiki.esoui.com/Main_Page

Example:
https://wiki.esoui.com/SimpleNotebookTutorial/part6

Your UI needs a control which got movable="true" and mouseEnabled="true".
Can be set via lua functions <control>:SetMouseEnabled(true) and <control>:SetMovable(true) too.
Add an event handler for OnMoveStop to save the actual <control>:GetLeft() and <control>:GetTop() to your SavedVariables and upon loading of your addon once reanchor the TopLevelControl to GuiRoot TOPLEFT TOPLEFT, and set it's x and y position to the saved left and top values of your SavedVariables.


All times are GMT -6. The time now is 12:21 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI