1 local function createOptionsTable(self)
4 get = function(item) return self.db.profile[item[#item]] end,
5 set = function(item, value) self.db.profile[item[#item]] = value; self:RefreshConfig() end,
13 dialogControl = "LSM30_Font",
14 name = "Indicator font",
15 values = AceGUIWidgetLSMlists.font,
20 for _, pos in ipairs(self.positions) do
24 return self.db.profile[pos][item[#item]];
26 set = function(item, value)
27 self.db.profile[pos][item[#item]] = value;
37 return table.concat(self.db.profile[pos]["auras"], "\n");
39 set = function(item, value)
41 for aura in string.gmatch(value, "[^\n]+") do
42 aura = string.gsub(aura, "^%s*(.-)%s$", "%1");
43 if tonumber(aura) then
44 table.insert(t, tonumber(aura));
46 table.insert(t, aura);
49 self.db.profile[pos]["auras"] = t;
55 name = "Only cast by me",
59 name = "Show remaining time",
73 return unpack(self.db.profile[pos]["textColor"]);
75 set = function(item, r, g, b, a)
76 self.db.profile[pos]["textColor"] = {r, g, b, a};
90 name = "Use default icon",
91 disabled = function() return not self.db.profile[pos]["showIcon"] end,
105 return unpack(self.db.profile[pos]["iconColor"]);
107 set = function(item, r, g, b, a)
108 self.db.profile[pos]["iconColor"] = {r, g, b, a};
109 self:RefreshConfig();
118 local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(OmaRF.db);
119 local options = createOptionsTable(OmaRF);
120 local config = LibStub("AceConfig-3.0");
121 config:RegisterOptionsTable("Indicators", options);
122 config:RegisterOptionsTable("Indicators Profiles", profiles);
124 local dialog = LibStub("AceConfigDialog-3.0");
125 OmaRF.optionsFrames = {};
126 OmaRF.optionsFrames.Indicators = dialog:AddToBlizOptions("Indicators", "Indicators");
127 OmaRF.optionsFrames.Profile = dialog:AddToBlizOptions("Indicators Profiles", "Profiles", "Indicators");