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
25 return self.db.profile.indicators[pos][item[#item]];
27 set = function(item, value)
28 self.db.profile.indicators[pos][item[#item]] = value;
38 return table.concat(self.db.profile.indicators[pos]["auras"], "\n");
40 set = function(item, value)
42 for aura in string.gmatch(value, "[^\n]+") do
43 aura = string.gsub(aura, "^%s*(.-)%s$", "%1");
44 if tonumber(aura) then
45 table.insert(t, tonumber(aura));
47 table.insert(t, aura);
50 self.db.profile.indicators[pos]["auras"] = t;
56 name = "Only cast by me",
60 name = "Show remaining time",
74 return unpack(self.db.profile.indicators[pos]["textColor"]);
76 set = function(item, r, g, b, a)
77 self.db.profile.indicators[pos]["textColor"] = {r, g, b, a};
91 name = "Use default icon",
92 disabled = function() return not self.db.profile.indicators[pos]["showIcon"] end,
106 return unpack(self.db.profile.indicators[pos]["iconColor"]);
108 set = function(item, r, g, b, a)
109 self.db.profile.indicators[pos]["iconColor"] = {r, g, b, a};
110 self:RefreshConfig();
119 local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(OmaRF.db);
120 local options = createOptionsTable(OmaRF);
121 local config = LibStub("AceConfig-3.0");
122 config:RegisterOptionsTable("Indicators", options);
123 config:RegisterOptionsTable("Indicators Profiles", profiles);
125 local dialog = LibStub("AceConfigDialog-3.0");
126 OmaRF.optionsFrames = {};
127 OmaRF.optionsFrames.Indicators = dialog:AddToBlizOptions("Indicators", "Indicators");
128 OmaRF.optionsFrames.Profile = dialog:AddToBlizOptions("Indicators Profiles", "Profiles", "Indicators");