Mercurial > wow > breuesk
comparison Gui.lua @ 59:c7330bc4a9ea
Escape button impl. Disabled for the moment
author | John@Yosemite-PC |
---|---|
date | Sun, 25 Mar 2012 17:43:31 -0400 |
parents | 615346b6ee99 |
children | dcf7c835d0a7 |
comparison
equal
deleted
inserted
replaced
58:615346b6ee99 | 59:c7330bc4a9ea |
---|---|
60 line.disabled = not PersonList:IsActive(le:GetId()) | 60 line.disabled = not PersonList:IsActive(le:GetId()) |
61 table.insert(tree,line) | 61 table.insert(tree,line) |
62 end | 62 end |
63 t1:SetList(tree) | 63 t1:SetList(tree) |
64 end | 64 end |
65 local f | |
66 local escapeButton = | |
67 { | |
68 shown = false, | |
69 ["IsShown"] = function(self) return self.shown end, | |
70 ["Hide"] = function(self) if f then bsk.print("Release!");AceGUI:Release(f); self.shown=false end end | |
71 } | |
65 | 72 |
66 function CreateGUI() | 73 function CreateGUI() |
74 -- special registration procedure to be closable with the escape button | |
75 --escapeButton.shown = true | |
76 --_G["BSK_ESCAPEBUTTON"] = escapeButton | |
77 --table.insert(_G.UISpecialFrames, "BSK_ESCAPEBUTTON") | |
78 | |
67 local admin = bsk.admin | 79 local admin = bsk.admin |
68 local f = AceGUI:Create("Frame") | 80 f = AceGUI:Create("Frame") |
69 | 81 |
70 f:SetCallback("OnClose",function(widget) AceGUI:Release(widget) end) | 82 f:SetCallback("OnClose",function(widget) escapeButton.shown = false; AceGUI:Release(widget) end) |
71 f:SetTitle("BSK") | 83 f:SetTitle("BSK") |
72 f:SetLayout("Flow") | 84 f:SetLayout("Flow") |
73 f:SetHeight(680) | 85 f:SetHeight(680) |
74 f:SetWidth(580) | 86 f:SetWidth(580) |
75 | 87 |