Quantcast How to move a frame (actionbar) from the default UI that does reset itself? - WoWInterface
Thread Tools Display Modes
07-22-18, 12:27 PM   #1
yess
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 21
How to move a frame (actionbar) from the default UI that does reset itself?

I am moving the actionbar (MainMenuBar) above a Bar of my own. But the bar resets to its original place now and then. I am not sure what triggers it.

Is there a way to prevent this except extracting the lua code from the data files and trying to figure out why it is reset and then taping into that with function hooking?
  Reply With Quote
07-22-18, 05:42 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 425
Lua Code:
  1. MainMenuBar:SetUserPlaced(true)
__________________
  Reply With Quote
07-24-18, 02:56 AM   #3
yess
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 21
Originally Posted by MunkDev View Post
Lua Code:
  1. MainMenuBar:SetUserPlaced(true)
I tried that but this does not work. It is still being reset. This also does not work for frames like the character frame as I added this to my BlizzMove addon and the frames do still get reset.
  Reply With Quote
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,739
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) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
07-24-18, 04:47 AM   #5
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 90
Not a sollution, rather a heads up to what I guess will be and additional problem: Whatever is reseting the position of the action bar will likely be doing it in combat (as well or mainly). And that means that if you were to hook onto whatever function is the culprit of the reset, then you'd be doing it in combat, causing taint, ADDON_ACTION_BLOCKED, ADDON_ACTION_FORBIDDEN, any or several of those "goodies"...

Yes, it's frustrating how doing minor changes to the default UI can become an harder, if not impossible, job than just throwing part of said UI out and putting something else written from scratch in its place.
  Reply With Quote
07-25-18, 12:36 AM   #6
yess
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 21
Thanks, it does work now. Not sure why id did not work before maybe I was just to tiered
  Reply With Quote
07-25-18, 10:48 AM   #7
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 162
Originally Posted by yess View Post
Thanks, it does work now. Not sure why id did not work before maybe I was just to tiered
Maybe you could post your solution for other people to use.
Post the code?
__________________
Better to fail then never have tried at all.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to move a frame (actionbar) from the default UI that does reset itself?

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