1 OmaRF = LibStub("AceAddon-3.0"):NewAddon("OmaRF");
3 OmaRF.normalBarColor = CreateColor(0.3, 0.3, 0.3);
4 OmaRF.dispelBarColor = CreateColor(1, 0.5, 0);
5 OmaRF.normalBackColor = {0.7, 0.7, 0.7};
6 OmaRF.dispelBackColor = {0.5, 0.2, 0};
9 OmaRF.majorFrames = {};
11 "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
14 OmaRF.running = false;
20 auras = {"Aqua Bomb"},
29 textColor = {1, 1, 1, 1},
34 useDefaultIcon = true,
36 iconColor = {1, 1, 1, 1},
42 function OmaRF:OnInitialize()
43 self.db = LibStub("AceDB-3.0"):New("OmaRFDB", defaults);
44 self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig");
45 self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig");
46 self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig");
49 function OmaRF:OnEnable()
53 function OmaRF:OnDisable()
55 for name, frame in pairs(self.frames) do
56 for _, ind in pairs(frame) do
60 for _, ind in ipairs(self.majorFrames[name]) do
68 SLASH_OMARF1 = "/omarf";
69 function SlashCmdList.OMARF(msg, editBox)
70 local loaded, finished = IsAddOnLoaded("OmaRFConfig");
72 local loaded, reason = LoadAddOn("OmaRFConfig");
74 if reason == "DISABLED" then
75 print("OmaRFConfig is disabled");
76 elseif reason == "MISSING" then
77 print("OmaRFConfig is missing");
78 elseif reason == "CORRUPT" then
79 print("OmaRFConfig is corrupt");
80 elseif reason == "INCOMPATIBLE" then
81 print("OmaRFConfig is incompatible");
82 elseif reason == "INTERFACE_VERSION" then
83 print("OmaRFConfig has wrong interface version");
87 elseif not finished then
88 -- slash command sent again when loading process is in progress
92 InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Profile);
93 InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators);