r73447 - trunk/Grid

0 views
Skip to first unread message

svnco...@wowace.com

unread,
May 11, 2008, 7:13:51 AM5/11/08
to wowace-gar...@googlegroups.com
Author: schelli
Date: Sun May 11 07:13:48 2008
New Revision: 73447

Log:
Grid: added grid tooltip and fubar text support

Modified:
trunk/Grid/GridCore.lua

Modified: trunk/Grid/GridCore.lua
==============================================================================
--- trunk/Grid/GridCore.lua (original)
+++ trunk/Grid/GridCore.lua Sun May 11 07:13:48 2008
@@ -5,6 +5,7 @@

local RL = AceLibrary("Roster-2.1")
local L = AceLibrary("AceLocale-2.2"):new("Grid")
+local tablet = AceLibrary("Tablet-2.0")
local waterfall = AceLibrary:HasInstance("Waterfall-1.0") and AceLibrary("Waterfall-1.0")

local check_libraries
@@ -138,6 +139,7 @@
Grid.hasIcon = true
Grid.defaultMinimapPosition = 240
Grid.cannotDetachTooltip = true
+Grid.clickableTooltip = true
Grid.independentProfile = true
Grid.defaultPosition = "RIGHT"
Grid.hideWithoutStandby = true
@@ -289,6 +291,39 @@
self:DisableModules()
end

+function Grid:OnTextUpdate()
+ self:SetText(GridLayout.db.profile.layout);
+end
+
+function Grid:OnTooltipUpdate()
+
+
+ local cat = tablet:AddCategory(
+ 'columns', 1,
+ 'child_textR', 1,
+ 'child_textG', 1,
+ 'child_textB', 1
+ )
+
+ if (GridLayout) and (next(GridLayout.layoutSettings)) then
+ for i,_ in pairs(GridLayout.layoutSettings) do
+ local line = {};
+ line['text'] = i;
+ line['func'] = 'OnTooltipItemClick'
+ line['arg1'] = self
+ line['arg2'] = i;
+
+ cat:AddLine(line);
+ end
+ end
+end
+
+function Grid:OnTooltipItemClick(v)
+ GridLayout.db.profile.layout = v
+ GridLayout:LoadLayout(v)
+end
+
+
function Grid:OnProfileEnable()
self.debugging = self.db.profile.debug
self:Debug("Loaded profile", "(", self:GetProfile(),")")

Reply all
Reply to author
Forward
0 new messages