self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig");
self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig");
self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig");
- self:SetupOptions();
end
function RaidFrameCustomization:OnEnable()
end
end
end
+
+SLASH_RAIDFRAMECUSTOM1 = "/raidframecustom";
+function SlashCmdList.RAIDFRAMECUSTOM(msg, editBox)
+ local loaded, finished = IsAddonLoaded("RaidFrameCustomizationConfig");
+ if not loaded then
+ local loaded, reason = LoadAddon("RaidFrameCustomizationConfig");
+ if not loaded then
+ if reason == "DISABLED" then
+ print("RaidFrameCustomizationConfig is disabled");
+ elseif reason == "MISSING" then
+ print("RaidFrameCustomizationConfig is missing");
+ elseif reason == "CORRUPT" then
+ print("RaidFrameCustomizationConfig is corrupt");
+ elseif reason == "INCOMPATIBLE" then
+ print("RaidFrameCustomizationConfig is incompatible");
+ elseif reason == "INTERFACE_VERSION" then
+ print("RaidFrameCustomizationConfig has wrong interface version");
+ end
+ return;
+ end
+ elseif not finished then
+ -- slash command sent again when loading process is in progress
+ return;
+ end
+
+ InterfaceOptionsFrame_OpenToCategory(RaidFrameCustomization.optionsFrames.Indicators);
+end