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};
10 "TOPLEFT", "TOPRIGHT", "CENTER", "BOTTOMLEFT", "BOTTOMRIGHT"
13 OmaRF.running = false;
17 indicatorFont = "Arial Narrow",
24 textColor = {1, 1, 1, 1},
29 useDefaultIcon = true,
31 iconColor = {1, 1, 1, 1},
37 function OmaRF:OnInitialize()
38 self.db = LibStub("AceDB-3.0"):New("OmaRFDB", defaults);
39 self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig");
40 self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig");
41 self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig");
44 function OmaRF:OnEnable()
48 function OmaRF:OnDisable()
50 for _, frame in pairs(self.frames) do
51 for _, ind in pairs(frame) do
53 ind.icon:SetTexture("");
58 SLASH_OMARF1 = "/omarf";
59 function SlashCmdList.OMARF(msg, editBox)
60 local loaded, finished = IsAddOnLoaded("OmaRFConfig");
62 local loaded, reason = LoadAddOn("OmaRFConfig");
64 if reason == "DISABLED" then
65 print("OmaRFConfig is disabled");
66 elseif reason == "MISSING" then
67 print("OmaRFConfig is missing");
68 elseif reason == "CORRUPT" then
69 print("OmaRFConfig is corrupt");
70 elseif reason == "INCOMPATIBLE" then
71 print("OmaRFConfig is incompatible");
72 elseif reason == "INTERFACE_VERSION" then
73 print("OmaRFConfig has wrong interface version");
77 elseif not finished then
78 -- slash command sent again when loading process is in progress
82 InterfaceOptionsFrame_OpenToCategory(OmaRF.optionsFrames.Indicators);