Thread Tools Display Modes
03/20/23, 05:03 PM   #1
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 20
How to move ui.xml

how can i make my ui movable and resizeble?
  Reply With Quote
03/20/23, 05:12 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,050
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.

Last edited by Baertram : 03/20/23 at 05:15 PM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » How to move ui.xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off