Moving the MainMenuBar
Im trying to put the MainmenuBar on top of my Datapanel but I keep having issues.
This is the code ive been trying to use: Lua Code:
If you need to se more here is the whole addon cData Thanks Coke |
Try
Lua Code:
|
This is what I use in my personal UI:
Code:
local function SetPosition(frame, ...) Code:
SetPosition(MainMenuBar, "BOTTOM", cDataMainPanel, "TOP", 0, 10) |
Quote:
The issues I was having is that when ever i would get in or out of a NPC vehicle the bars you just keep scrolling between the OverrideActionBar and the MainMenubar untill i disabled the addon. Maybe ity was because it was during the BFA pre launch or not but your suggestion seems to be working. Thanks again. |
Vrul, does that mean that
UIPARENT_MANAGED_FRAME_POSITIONS[frame] = nil In essence tells UIParent to stop handling the frame ? If so its a might bit easier than changing the different functions to do nothing :) If you don't mind I might utilise that block of code ( with full credit of course :) ) |
No, that table only has entries for certain things. I just nil it out in case that particular one is there (or gets added in the future).
For this case in particular, the code that positions MainMenuBar checks if either it or MicroButtonAnBagsBar IsUserPlaced then that code is skipped. However, ExtraActionBarFrame is in UIPARENT_MANAGED_FRAME_POSITIONS and is handled by a loop that iterates over it's entries. The code called in that loop also checks if ignoreFramePositionManager is set and exits out early. There is one other case: CastingBarFrame:GetAttribute("ignoreFramePositionManager") so to also handle that you would need: Code:
local function SetPosition(frame, ...) |
Ah, so pretty much what I do at present .. look at what will stop it working and try to implement the same think but that extra stuff I didn't realise we could play with.
|
Ok so not everything is perfect. As you can see in the image above when i got out of a NPC vehicle (last part to highmountain quest line bombing run) my number for the mainmenu bar disapeared and now the bar is none clickable. Only way to fix is to do a /reload and reload the UI. Any thoughts? Coke Edit: As you can see after a reload the bar number is visable and the buttons are clickable once again. |
I just relized WoW moved the Xp bar below the MainmenuBar so now if the player is not Max Level the bar shows and my alignment is off.
So Ive been hunting for a solution but cant seem to find one. Will the following work. Code:
if UnitLevel("player") == MAX_LEVEL then Coke |
Quote:
Lua Code:
|
Quote:
|
Code:
8/15 11:57:08.685 An action was blocked in combat because of taint - MainMenuBar:SetPoint() I just reparent it to a hidden frame, but causing taint. |
MainMenuBar:SetMovable(true)
MainMenuBar:SetUserPlaced(true) MainMenuBar:SetPoint("BOTTOM", 100, 20) -- this part to restore the MainMenuBar after vehicule exit CreateFrame("frame", nil, nil, "SecureHandlerBaseTemplate" ):WrapScript(ActionButton1, "OnShow", [[ local MainMenuBarArtFrame = self:GetParent() local MainMenuBar = MainMenuBarArtFrame:GetParent() local UIParent = MainMenuBar:GetParent() MainMenuBar:SetPoint("BOTTOM", UIParent, "BOTTOM", 100, 20) ]]) *it doesn't work if you display the right bottom multibar Quote:
MainMenuBarArtFrame:Hide() but you will have to make adjustment to other frames |
Quote:
Code:
MainMenuBar:SetMovable(true) Code:
MultiBarRight:SetMovable(true) |
Okay with Taudiers tip it works now
(even though I HAVE MultiBarRight enabled and visible). I just react on PLAYER_CONTROL_GAINED and it works again. Code:
if event:match("PLAYER_CONTROL_GAINED") then |
Quote:
|
Quote:
When I level and for example do the quests Forcing Fate's Hand (where you control the undead hand at the dead turtle loa) afterwards the bottom bar is completely unusable. |
well, if every wrong codes didn't work at all i guess they all would work
|
Hmmm...I have no problems with the main menu bar in rActionBar.
That is of course because I am disabling the default main menu bar and the override action bar. I am using all the buttons though by reparenting them. Couldn't you just put a background texture somewhere and put sth like rActionBar (or any other bar mod) on top if it is giving you so much trouble? |
Quote:
Code:
MainMenuBar:SetMovable(true) What is strange is that it ONLY affects MainMenuBar but NOT MultiBarRight and that Taudiers fixes it IF the toon is max level. @Taudier: what is wrong about YOUR code? |
All times are GMT -6. The time now is 01:01 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI