WoWInterface SVN pStats

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 15 to Rev 14
    Reverse comparison

Rev 15 → Rev 14

trunk/pStats/icon.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/pStats/pStats.lua
6,22 → 6,7
end
end
 
local dataobj, elapsed = LibStub:GetLibrary('LibDataBroker-1.1'):NewDataObject('Stats', {text = '2.0 MiB', icon = [=[Interface\AddOns\pStats\icon]=]}), 0.5
 
CreateFrame('Frame'):SetScript('OnUpdate', function(self, al)
elapsed = elapsed + al
if(elapsed > 0.5) then
dataobj.text = formats(gcinfo())
elapsed = 0
end
end)
 
function dataobj.OnLeave()
GameTooltip:SetClampedToScreen(true)
GameTooltip:Hide()
end
 
function dataobj.OnEnter(self)
local function OnEnter(self)
local db = pStatsDB
local r, g, b = unpack(db.colors)
local down, up, latency = GetNetStats()
60,24 → 45,16
GameTooltip:Show()
end
 
local function collect(self)
 
end
 
function dataobj.OnClick(self, button)
local function OnClick(self, button)
if(button == "RightButton") then
local collected = collectgarbage('count')
collectgarbage('collect')
dataobj.OnEnter(self)
OnEnter(self)
GameTooltip:AddLine('\n')
GameTooltip:AddDoubleLine('Garbage Collected:', formats(collected - collectgarbage('count')))
GameTooltip:Show()
else
if(self:GetName() == 'MiniMapTracking' or self:GetName() == 'MiniMapTrackingButton') then
ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, 'MiniMapTracking', 0, self:GetHeight())
else
InterfaceOptionsFrame_OpenToFrame('pStats')
end
ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, 'MiniMapTracking', 0, self:GetHeight())
GameTooltip:Hide()
end
end
93,16 → 70,22
end
 
if(select(4, GetBuildInfo()) >= 3e4) then
MiniMapTrackingButton:EnableMouseWheel()
MiniMapTrackingButton:EnableMouseWheel(true)
MiniMapTrackingButton:RegisterForClicks('AnyUp')
MiniMapTrackingButton:SetScript('OnMouseWheel', OnMouseWheel)
MiniMapTrackingButton:SetScript('OnClick', dataobj.OnClick)
MiniMapTrackingButton:SetScript('OnEnter', dataobj.OnEnter)
MiniMapTrackingButton:SetScript('OnLeave', dataobj.OnLeave)
MiniMapTrackingButton:SetScript('OnClick', OnClick)
MiniMapTrackingButton:SetScript('OnEnter', OnEnter)
MiniMapTrackingButton:SetScript('OnLeave', function()
GameTooltip:SetClampedToScreen(true)
GameTooltip:Hide()
end)
else
MiniMapTracking:EnableMouseWheel()
MiniMapTracking:EnableMouseWheel(true)
MiniMapTracking:SetScript('OnMouseWheel', OnMouseWheel)
MiniMapTracking:SetScript('OnMouseUp', dataobj.OnClick)
MiniMapTracking:SetScript('OnEnter', dataobj.OnEnter)
MiniMapTracking:SetScript('OnLeave', dataobj.OnLeave)
MiniMapTracking:SetScript('OnMouseUp', OnClick)
MiniMapTracking:SetScript('OnEnter', OnEnter)
MiniMapTracking:SetScript('OnLeave', function()
GameTooltip:SetClampedToScreen(true)
GameTooltip:Hide()
end)
end
\ No newline at end of file
trunk/pStats/pStats.toc
2,14 → 2,12
## Author: p3lim
## Version: 20400.wowi:revision
## Title: |cffff6000p|rStats
## Notes: Replaces the tooltip on MinimapTracking with a more informative one. Also supports LDB
## OptionalDeps: LibStub, CallbackHandler-1.0, LibSimpleOptions-1.0, LibDataBroker-1.1
## Notes: Replaces the tooltip on MinimapTracking with a more informative one
## OptionalDeps: LibStub, LibSimpleOptions-1.0
## SavedVariablesPerCharacter: pStatsDB
 
Libs\LibStub.lua
Libs\CallbackHandler-1.0.lua
Libs\LibSimpleOptions-1.0.lua
Libs\LibDataBroker-1.1.lua
LibSimpleOptions-1.0\LibStub\LibStub.lua
LibSimpleOptions-1.0\LibSimpleOptions-1.0.lua
 
pStats.lua
pStatsConfig.lua
\ No newline at end of file
trunk/pStats Property changes : Added: svn:externals + LibSimpleOptions-1.0 http://svn.wowace.com/wowace/trunk/LibSimpleOptions-1.0