LibStub('LibSimpleOptions-1.0').AddOptionsPanel('pStats', function(self)
+ local db = pStatsDB or {colors = {0, 1, 1}, sorted = true}
local title, sub = self:MakeTitleTextAndSubText('pStats', 'These options allow you to customize the looks of pStats.')
+ pStatsDB = db
+
self:MakeButton(
'name', 'Class Color',
'description', 'Set text color based on player class',
@@ -19,7 +22,7 @@ |
'description', 'Set custom text colors with a palette',
'hasAlpha', false,
'defaultR', 0, 'defaultG', 1, 'defaultB', 1,
- 'getFunc', function() return unpack(pStatsDB.colors) end,
+ 'getFunc', function() return unpack(db.colors) end,
'setFunc', function(r, g, b)
pStatsDB.colors[1] = r
pStatsDB.colors[2] = g
@@ -31,20 +34,9 @@ |
'name', 'Toggle sorting method',
'description', 'Check to sort by memory.\nUn-check to sort by name',
'default', true,
- 'current', pStatsDB.sorted,
+ 'current', db.sorted,
'setFunc', function(value)
pStatsDB.sorted = value
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -76)
-
- self:MakeToggle(
- 'name', 'Toggle Tracking Tooltip hook',
- 'description', 'Check to enable the tooltip on tracking frame button',
- 'default', true,
- 'current', pStatsDB.hooked,
- 'setFunc', function(value)
- pStatsDB.hooked = value
- print('|cffff8080pStats:|r Reload your UI or relog to affect changes to settings.')
- end
- ):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -106)
end) |