WoWInterface SVN sStats

Compare Revisions

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

Rev 4 → Rev 3

trunk/sStats/sStats.toc
1,7 → 1,7
## Interface: 30200
## Title: sStats
## Author: Seerah
## Version: 1.0 beta 2
## Version: 1.0 beta 1
## Notes: memory, latency, fps, and durability display
## SavedVariables: sStatsDB
## SavedVariablesPerCharacter: sStatsPCDB
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,7 → 16,6
locked = false,
preColor = {r=1, g=1, b=1},
sufColor = {r=1, g=1, b=1},
classColor = false,
}
 
 
30,9 → 29,6
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()
45,7 → 41,6
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)
57,6 → 52,7
sStats.optionsFrame[f:GetName()]:Show()
end
end)
f:SetBackdrop({bgFile ="Interface\\Buttons\\WHITE8x8",})
local fstring = f:CreateFontString("sStats_"..module.."Text")
 
-- ConfigModule(f, fstring)
232,7 → 228,6
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
242,21 → 237,6
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 = {
367,22 → 347,8
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)
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
sufHex = RGBPercToHex(db.sufColor.r,db.sufColor.g,db.sufColor.b)
 
for k,v in pairs(modules) do
ConfigModule(v)