Added Aurora integration for GameMenuButton.
Safturento [11-02-11 - 20:12]
Added Aurora integration for GameMenuButton.
diff --git a/stAddonManager/stAddonManager.lua b/stAddonManager/stAddonManager.lua
index 739abf7..8d9950f 100644
--- a/stAddonManager/stAddonManager.lua
+++ b/stAddonManager/stAddonManager.lua
@@ -68,11 +68,7 @@ local function StripTextures(object, kill)
for i=1, object:GetNumRegions() do
local region = select(i, object:GetRegions())
if region:GetObjectType() == "Texture" then
- if kill then
- region:Kill()
- else
- region:SetTexture(nil)
- end
+ region:SetTexture(nil)
end
end
end
@@ -325,6 +321,10 @@ end
SLASH_STADDONMANAGER1, SLASH_STADDONMANAGER2, SLASH_STADDONMANAGER3 = "/staddonmanager", "/stam", "/staddon"
SlashCmdList["STADDONMANAGER"] = LoadWindow
+local function CheckForAddon(event, addon, addonName)
+ return ((event == "PLAYER_ENTERING_WORLD" and IsAddOnLoaded(addonName)) or (event == "ADDON_LOADED" and addon == addonName))
+end
+
local gmbAddOns = CreateFrame("Button", "GameMenuButtonAddOns", GameMenuFrame, "GameMenuButtonTemplate")
gmbAddOns:SetSize(GameMenuButtonMacros:GetWidth(), GameMenuButtonMacros:GetHeight())
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight()+GameMenuButtonMacros:GetHeight());
@@ -339,12 +339,16 @@ end)
gmbAddOns:RegisterEvent("ADDON_LOADED")
gmbAddOns:RegisterEvent("PLAYER_ENTERING_WORLD")
gmbAddOns:SetScript("OnEvent", function(self, event, addon)
- if (event == "PLAYER_ENTERING_WORLD" and IsAddOnLoaded("Tukui")) or (event == "ADDON_LOADED" and addon == "Tukui") then
+ if CheckForAddon(event, addon, "Aurora") then
+ local F, C = unpack(Aurora)
+ F.Reskin(gmbAddOns)
+
+ elseif CheckForAddon(event, addon, "Tukui") then
local T, C, L = unpack(Tukui)
T.SkinButton(gmbAddOns)
local font = {GameMenuButtonMacros:GetFontString():GetFont()}
local shadow = {GameMenuButtonMacros:GetFontString():GetShadowOffset()}
gmbAddOns:GetFontString():SetFont(unpack(font))
gmbAddOns:GetFontString():SetShadowOffset(unpack(shadow))
- end
+ end
end)
\ No newline at end of file