Works in /run, NOT in addon
Ok. Baby steps.
Framestack showed two things I'd like to hide:
I used this: Code:
local f = CreateFrame("Frame") #1 (The tiny numbered button) does not. What confuses me is that #1's line works just fine as part of this "run" command: /run AddonCompartmentFrame:Hide() What needs to change, to make it work within the addon (so that both of those "Hide()" lines work)? Thanks! :cool: |
The AddonCompartmentFrame's UpdateDisplay method has an explicit self:Show()
The initial UpdateDisplay happens in the PLAYER_ENTERING_WORLD event which runs after PLAYER_LOGIN. It will do and additonal UpdateDisplay for each registerd addon including those that are Load-On-Demand (LOD) which can be loaded at any time during a session. Try replacing AddonCompartmentFrame:Hide() with Lua Code:
|
Quote:
Unless I misunderstood, this is what I ended up with: Code:
local f = CreateFrame("Frame") Thanks for checking in, though. |
Try changing it to OnShow - think there was a minor hiccough in the typing there.
|
Xrystal is indeed correct. Lua is case sensitive but my brain sometimes refuses to accept it. Apologies.
Fixed the code in my original post for future travelers. |
Quote:
Code:
There still appears to be something missing, however. Loading up all of my addons, I still saw the little numbered button I want to hide. Something wasn't working. Steps taken:
I can only assume something's missing, in the code above, but I am not yet educated enough to spot it. |
The Blizzard UI with the exception of LOD addons is loaded before 3rd party addons which means yoiu don't need to create a frame and wait for an event to do what you are wanting.
That asside, I was obviously having a bad day yesterday, OnShow won't fire until after a frame has been hidden in order to actually Show. This would be your entire addon: Lua Code:
Added the OnShow/Hide for ExpansionLandingPageMinimapButton (for characters leveling into an expansion where it becomes available) |
Quote:
EDIT: It works, just as I had hoped. The big dragon isles summary button (bottom left) and the small addons button (top right) are gone. Combining this with HidingBar, the minimap area looks CLEAN! Thanks for the time! |
All times are GMT -6. The time now is 12:02 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI