View Single Post
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: 4,989
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