WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   How to move a frame (actionbar) from the default UI that does reset itself? (https://www.wowinterface.com/forums/showthread.php?t=56412)

yess 07-22-18 12:27 PM

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?

MunkDev 07-22-18 05:42 PM

Lua Code:
  1. MainMenuBar:SetUserPlaced(true)

yess 07-24-18 02:56 AM

Quote:

Originally Posted by MunkDev (Post 328861)
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.

zork 07-24-18 04:45 AM

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.

aallkkaa 07-24-18 04:47 AM

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.

yess 07-25-18 12:36 AM

Thanks, it does work now. Not sure why id did not work before maybe I was just to tiered :D

Yukyuk 07-25-18 10:48 AM

Quote:

Originally Posted by yess (Post 328953)
Thanks, it does work now. Not sure why id did not work before maybe I was just to tiered :D

Maybe you could post your solution for other people to use.
Post the code?


All times are GMT -6. The time now is 03:44 AM.

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