WoWInterface SVN sStats

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

trunk/sStats/sStats.lua
2,8 → 2,8
sStats.callbacks = sStats.callbacks or LibStub("CallbackHandler-1.0"):New(sStats)
local LSM = LibStub("LibSharedMedia-3.0")
local widgetLists = AceGUIWidgetLSMlists
local r, g, b = 1, 0, 0
local db, preHex, sufHex
local _,class = UnitClass("player")
local modules = {}
local fontFlags = {"None", "Outline", "Thick Outline", "Monochrome"}
local alignments = {"RIGHT", "LEFT", "CENTER"}
16,6 → 16,7
locked = false,
preColor = {r=1, g=1, b=1},
sufColor = {r=1, g=1, b=1},
classColor = false,
}
 
 
29,6 → 30,9
if not db.locked then
frame:SetMovable(true)
frame:SetBackdropColor(0,0,0,.4)
else
frame:SetMovable(false)
frame:SetBackdropColor(0,0,0,0)
end
local fstring = _G[frame:GetName().."Text"]
fstring:ClearAllPoints()
41,6 → 45,7
local f = CreateFrame("Frame", "sStats_"..module, UIParent)
f:SetWidth(100)
f:SetHeight(20)
f:SetBackdrop({bgFile ="Interface\\Buttons\\WHITE8x8",})
f:EnableMouse(true)
f:SetScript("OnMouseDown", function(self) if self:IsMovable() then self:StartMoving() end end)
f:SetScript("OnMouseUp", function(self)
52,7 → 57,6
sStats.optionsFrame[f:GetName()]:Show()
end
end)
f:SetBackdrop({bgFile ="Interface\\Buttons\\WHITE8x8",})
local fstring = f:CreateFontString("sStats_"..module.."Text")
 
-- ConfigModule(f, fstring)
228,6 → 232,7
name = "Suffix Text Color",
desc = "The color of the module's suffix text.",
type = "color",
disabled = function() return db.classColor end,
get = function() return db.sufColor.r, db.sufColor.g, db.sufColor.b end,
set = function(_,r,g,b)
db.sufColor.r = r
237,6 → 242,21
end,
order = 7,
},
classColor = {
name = "Class colored suffix",
desc = "Color the module's suffix text by class.",
type = "toggle",
get = function() return db.classColor end,
set = function()
db.classColor = not db.classColor
if db.classColor then
sufHex = RGBPercToHex(colors[class].r,colors[class].g,colors[class].b)
else
sufHex = RGBPercToHex(db.sufColor.r,db.sufColor.g,db.sufColor.b)
end
end,
order = 8,
},
},
},
profile = {
347,8 → 367,22
end
sStats.optionsFrame.profile = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("sStats", "Profile", "sStats", "profile")
 
colors = CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS --support for CUSTOM_CLASS_COLORS addons
if CUSTOM_CLASS_COLORS then
CUSTOM_CLASS_COLORS:RegisterCallback(function()
colors = CUSTOM_CLASS_COLORS
if db.classColor then
sufHex = RGBPercToHex(colors[class].r,colors[class].g,colors[class].b)
end
end)
end
 
preHex = RGBPercToHex(db.preColor.r,db.preColor.g,db.preColor.b)
sufHex = RGBPercToHex(db.sufColor.r,db.sufColor.g,db.sufColor.b)
if db.classColor then
sufHex = RGBPercToHex(colors[class].r,colors[class].g,colors[class].b)
else
sufHex = RGBPercToHex(db.sufColor.r,db.sufColor.g,db.sufColor.b)
end
 
for k,v in pairs(modules) do
ConfigModule(v)
trunk/sStats/sStats.toc
1,7 → 1,7
## Interface: 30200
## Title: sStats
## Author: Seerah
## Version: 1.0 beta 1
## Version: 1.0 beta 2
## Notes: memory, latency, fps, and durability display
## SavedVariables: sStatsDB
## SavedVariablesPerCharacter: sStatsPCDB