View Single Post
07-24-18, 04:45 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
This is the drag function I am using in a lot of my addons to make them movable via lock/unlock slash command.
https://github.com/zorker/rothui/blo...gframe.lua#L58

If I remember correctly both SetUserPlaced and SetMovable have to be in place.

Lua Code:
  1. frame:SetMovable(true)
  2. frame:SetUserPlaced(true)

It is important to note that you must load those settings when you initialize the addon. If you delay the call until PLAYER_LOGIN it will not work. Somewhere in the time from init to login the layout-local.txt is applied.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote