Mercurial > wow > askmrrobot
comparison Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @ 106:e635cd648e01 v49
7.2 update
author | yellowfive |
---|---|
date | Tue, 28 Mar 2017 16:10:00 -0700 |
parents | 01b63b8ed811 |
children | e31b02b24488 |
comparison
equal
deleted
inserted
replaced
105:3ce266c86bd3 | 106:e635cd648e01 |
---|---|
1 --[[----------------------------------------------------------------------------- | 1 --[[----------------------------------------------------------------------------- |
2 TreeGroup Container | 2 TreeGroup Container |
3 Container that uses a tree control to switch between groups. | 3 Container that uses a tree control to switch between groups. |
4 -------------------------------------------------------------------------------]] | 4 -------------------------------------------------------------------------------]] |
5 local Type, Version = "TreeGroup", 37 | 5 local Type, Version = "TreeGroup", 40 |
6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) | 6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end | 7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
8 | 8 |
9 -- Lua APIs | 9 -- Lua APIs |
10 local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type | 10 local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type |
293 -------------------------------------------------------------------------------]] | 293 -------------------------------------------------------------------------------]] |
294 local methods = { | 294 local methods = { |
295 ["OnAcquire"] = function(self) | 295 ["OnAcquire"] = function(self) |
296 self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE) | 296 self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE) |
297 self:EnableButtonTooltips(true) | 297 self:EnableButtonTooltips(true) |
298 self.frame:SetScript("OnUpdate", FirstFrameUpdate) | |
298 end, | 299 end, |
299 | 300 |
300 ["OnRelease"] = function(self) | 301 ["OnRelease"] = function(self) |
301 self.status = nil | 302 self.status = nil |
302 for k, v in pairs(self.localstatus) do | 303 for k, v in pairs(self.localstatus) do |
332 button:SetScript("OnEnter",Button_OnEnter) | 333 button:SetScript("OnEnter",Button_OnEnter) |
333 button:SetScript("OnLeave",Button_OnLeave) | 334 button:SetScript("OnLeave",Button_OnLeave) |
334 | 335 |
335 button.toggle.button = button | 336 button.toggle.button = button |
336 button.toggle:SetScript("OnClick",Expand_OnClick) | 337 button.toggle:SetScript("OnClick",Expand_OnClick) |
338 | |
339 button.text:SetHeight(14) -- Prevents text wrapping | |
337 | 340 |
338 return button | 341 return button |
339 end, | 342 end, |
340 | 343 |
341 ["SetStatusTable"] = function(self, status) | 344 ["SetStatusTable"] = function(self, status) |
665 scrollbar:SetWidth(16) | 668 scrollbar:SetWidth(16) |
666 scrollbar:SetScript("OnValueChanged", OnScrollValueChanged) | 669 scrollbar:SetScript("OnValueChanged", OnScrollValueChanged) |
667 | 670 |
668 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") | 671 local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") |
669 scrollbg:SetAllPoints(scrollbar) | 672 scrollbg:SetAllPoints(scrollbar) |
670 scrollbg:SetTexture(0,0,0,0.4) | 673 scrollbg:SetColorTexture(0,0,0,0.4) |
671 | 674 |
672 local border = CreateFrame("Frame",nil,frame) | 675 local border = CreateFrame("Frame",nil,frame) |
673 border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT") | 676 border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT") |
674 border:SetPoint("BOTTOMRIGHT") | 677 border:SetPoint("BOTTOMRIGHT") |
675 border:SetBackdrop(PaneBackdrop) | 678 border:SetBackdrop(PaneBackdrop) |