MainMenuBar glitches
I am trying to move the MainMenuBar above a libdatabroker display (ChocolateBar).
But the MainMenuBar is constantly reset somewhere in Blizzards code. Now I know that I can avoid this by setting it to user placed: Code:
MainMenuBar:SetUserPlaced(true) I have tried to set it back to not user placed when entering a vehicle to avoid this (as does TitanPanel) but its still glitching sometimes if I enter a vehicle several times during a combat. Probably because UNIT_ENTERING_VEHICLE / UNIT_EXITED_VEHICLE also triggers PLAYER_REGEN_DISABLED and PLAYER_REGEN_DISABLED despite a continuous combat situation... Has anyone more insight on what is going on with the MainMenuBar's placement in the first place? And why is it non clickable if SetUserPlaced is still true when entering/leaving a vehicle? |
Doesn't ChocolateBar have this built in by using the Jostle library?
|
Quote:
Try also adding this: Code:
MainMenuBar:SetMovable(true) |
nUI hooks into various functions after Blizzard does its stuff to move things back to where we want them.
-- Reparent, move and allow user placement changes made here hooksecurefunc("UpdateMicroButtonsParent",....) -- Used for scaling buttons to our chosen size hooksecurefunc("MoveMicroButtons", ...) -- Used to adjust placement of the arrow tip added to "MicroButtons" info system hooksecurefunc(HelpTip,"Show",....) Not sure if any of them will help you with what you want to do but you never know. |
Quote:
Quote:
Quote:
|
Code:
MainMenuBar.ignoreFramePositionManager = true The glithc with the MainMenuBar not being clickable was that when I call Code:
MainMenuBar:SetUserPlaced(true) Code:
MainMenuBar:SetPoints(... Anyway, the fix I came up with was to set SetUserPlaced back to false when entering a vehicle. And if in combat then wait until end of combat before moving the MainMenuBar and setting SetUserPlaced to true again. What I missed though is that that I used the event UNIT_ENTERING_VEHICLE to set SetUserPlaced(false). But that is too early because PLAYER_REGEN_ENABLED is triggered after that despite still in combat and I had that hocked to call SetUserPlaced(true) again.... :D |
If you want to catch changes to combat mode to apply settings before combat then I would use PLAYER_REGEN_DISABLED and then reverse it out on PLAYER_REGEN_ENABLED.
I use these to stop interactions during combat that players may be tempted to do or to minimise/hide non combat windows during combat. PLAYER_REGEN_DISABLED may trigger after UNIT_ENTERING_VEHICLE or before. Similarly PLAYER_REGEN_ENABLED may trigger before UNIT_EXITING_VEHICLE or after. Not too much helpful but they may be events you hadn't considered before. |
this question came many times, here is an addon https://www.wowinterface.com/downloa...inMenuBar.html
|
Quote:
Quote:
The interesting part is that they trigger EVERY time when you enter a vehicle DURING a combat situation. So the sequence of of the events when entering a vehicle is: Player not in combat: UNIT_ENTERING_VEHICLE UNIT_ENTERED_VEHICLE Player pulls and after that enters a vehicle: PLAYER_REGEN_DISABLED <-- player pulled UNIT_ENTERING_VEHICLE PLAYER_REGEN_ENABLED --> this here caused my function MoveAndLockMainMenuBar() (called by a timer), to occasionally set MainMenuBar:SetUserPlaced(true) as InCombatLockDown() and UnitInVehicle("Player") booth returns false! In this stage! PLAYER_REGEN_DISABLED UNIT_ENTERED_VEHICLE ... UNIT_EXITING_VEHICLE ... --blizzards code repositions the MainMenuBar and it breaks due to MainMenuBar:SetUserPlaced(true) UNIT_EXITED_VEHICLE PLAYER_REGEN_ENABLED (combat actually ended and we are not in a vehicle) --> MoveAndLockMainMenuBar() Quote:
Code:
function ChocolateBar:UNIT_EXITING_VEHICLE() Easy fix for my initial problem but what a headache to find this out |
Quote:
|
All times are GMT -6. The time now is 04:27 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI