View Single Post
01-11-24, 08:03 PM   #1
jlrm365
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 113
Question Works in /run, NOT in addon

Ok. Baby steps.

Framestack showed two things I'd like to hide:
  1. The tiny button to the top-right of the minimap, appearing as a number - titled "AddOns" when you hover over it
  2. The big button on the bottom-left of the minimap that shows your dragon riding points and dragonflight reps

I used this:

Code:
local f = CreateFrame("Frame")
f:SetScript("OnEvent",function(self,event,...)
  AddonCompartmentFrame:Hide()
  ExpansionLandingPageMinimapButton:Hide()
end)
f:RegisterEvent("PLAYER_LOGIN")
#2 (The big button on the minimap) disappears, as I'd like it to.
#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!
  Reply With Quote