X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/625925f9e5095f719067ca840de5fd75bb1eb578:/RaidFrameCustomization/Core.lua..b8c70450d10559c08516416bf92fb95434bd3034:/OmaRF/Core.lua diff --git a/RaidFrameCustomization/Core.lua b/OmaRF/Core.lua similarity index 52% rename from RaidFrameCustomization/Core.lua rename to OmaRF/Core.lua index 18dbf08..e4c2d29 100644 --- a/RaidFrameCustomization/Core.lua +++ b/OmaRF/Core.lua @@ -1,16 +1,16 @@ -RaidFrameCustomization = LibStub("AceAddon-3.0"):NewAddon("RaidFrameCustomization"); +OmaRF = LibStub("AceAddon-3.0"):NewAddon("OmaRF"); -RaidFrameCustomization.normalBarColor = CreateColor(0.3, 0.3, 0.3); -RaidFrameCustomization.dispelBarColor = CreateColor(1, 0.5, 0); -RaidFrameCustomization.normalBackColor = {0.7, 0.7, 0.7}; -RaidFrameCustomization.dispelBackColor = {0.5, 0.2, 0}; +OmaRF.normalBarColor = CreateColor(0.3, 0.3, 0.3); +OmaRF.dispelBarColor = CreateColor(1, 0.5, 0); +OmaRF.normalBackColor = {0.7, 0.7, 0.7}; +OmaRF.dispelBackColor = {0.5, 0.2, 0}; -RaidFrameCustomization.frames = {}; -RaidFrameCustomization.positions = { +OmaRF.frames = {}; +OmaRF.positions = { "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT" }; -RaidFrameCustomization.running = false; +OmaRF.running = false; local defaults = { profile = { @@ -33,18 +33,18 @@ local defaults = { } }; -function RaidFrameCustomization:OnInitialize() - self.db = LibStub("AceDB-3.0"):New("RaidFrameCustomizationDB", defaults); +function OmaRF:OnInitialize() + self.db = LibStub("AceDB-3.0"):New("OmaRFDB", defaults); self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig"); self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig"); self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig"); end -function RaidFrameCustomization:OnEnable() +function OmaRF:OnEnable() self:RefreshConfig(); end -function RaidFrameCustomization:OnDisable() +function OmaRF:OnDisable() self.running = false; for _, frame in pairs(self.frames) do for _, ind in pairs(frame) do @@ -54,22 +54,22 @@ function RaidFrameCustomization:OnDisable() end end -SLASH_RAIDFRAMECUSTOM1 = "/raidframecustom"; -function SlashCmdList.RAIDFRAMECUSTOM(msg, editBox) - local loaded, finished = IsAddonLoaded("RaidFrameCustomizationConfig"); +SLASH_OMARF1 = "/omarf"; +function SlashCmdList.OMARF(msg, editBox) + local loaded, finished = IsAddonLoaded("OmaRFConfig"); if not loaded then - local loaded, reason = LoadAddon("RaidFrameCustomizationConfig"); + local loaded, reason = LoadAddon("OmaRFConfig"); if not loaded then if reason == "DISABLED" then - print("RaidFrameCustomizationConfig is disabled"); + print("OmaRFConfig is disabled"); elseif reason == "MISSING" then - print("RaidFrameCustomizationConfig is missing"); + print("OmaRFConfig is missing"); elseif reason == "CORRUPT" then - print("RaidFrameCustomizationConfig is corrupt"); + print("OmaRFConfig is corrupt"); elseif reason == "INCOMPATIBLE" then - print("RaidFrameCustomizationConfig is incompatible"); + print("OmaRFConfig is incompatible"); elseif reason == "INTERFACE_VERSION" then - print("RaidFrameCustomizationConfig has wrong interface version"); + print("OmaRFConfig has wrong interface version"); end return; end @@ -78,5 +78,5 @@ function SlashCmdList.RAIDFRAMECUSTOM(msg, editBox) return; end - InterfaceOptionsFrame_OpenToCategory(RaidFrameCustomization.optionsFrames.Indicators); + InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators); end