Mercurial > wow > breuesk
changeset 88:f844309a0e35
Clear out a few GUI bugs.
Re-integrate the escape button
author | John@Yosemite-PC |
---|---|
date | Mon, 16 Apr 2012 07:05:37 -0400 |
parents | 6035541e47dd |
children | b89558d3e833 |
files | Gui.lua |
diffstat | 1 files changed, 5 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui.lua Sun Apr 15 15:19:50 2012 -0400 +++ b/Gui.lua Mon Apr 16 07:05:37 2012 -0400 @@ -12,8 +12,6 @@ local getn=getn setfenv(1,bsk) --- todo: switching lists should close a presently-open bid - local copy = function(t) local c = {} if not t then return c end @@ -37,7 +35,6 @@ for _,v in pairs(lids) do local l = LootLists:Select(v) pull[l:GetId()] = l:GetName() - --local entry = {value=i,text=v.name} if l:GetLength() > 0 then pulldown:SetItemDisabled(i,true) end @@ -55,7 +52,7 @@ { shown = false, ["IsShown"] = function(self) return self.shown end, - ["Hide"] = function(self) if f then AceGUI:Release(f); self.shown=false end end + ["Hide"] = function(self) if f then AceGUI:Release(f); self.shown=false; f=nil end end } SelectorListEventDispatcher = @@ -303,21 +300,6 @@ --end self:Redraw() end, - ["Force"] = function(self,who) -- todo: remove this and the horse it rode in on - local new = self.Convert(who,72) - InitiateBid(new) - --self:Redraw() - end, - ["Retract"] = function(self,who) -- todo: remove this and the horse it rode in on - -- todo - --for i,v in pairs(self.data) do - -- if who.value == v.value then - -- table.remove(self.data,i) - -- end - --end - InitiateRetract(copy(who)) - --self:Redraw() - end, ["Convert"] = function(who,roll) -- convert an LE object into one suitable to put in a SelectorList local new = copy(who) new.disabled = false -- todo: should be unnessary - they can't get on the list like this @@ -428,7 +410,7 @@ ["OnSelection"] = function(self,_) self.widget:SetDisabled(false); self.widget:SetText(sformat("Retract bid (%s)",RListEventDispatch:LatestValue().textPlain)) end, ["OnSelectionCleared"] = function(self) self.widget:SetDisabled(true); self.widget:SetText("Retract bid") end } - adminRetract:SetCallback("OnClick",function(widget) RListPopulator:Retract(RListEventDispatch:LatestValue()) end) + adminRetract:SetCallback("OnClick",function(widget) InitiateRetract(RListEventDispatch:LatestValue()) end) RListEventDispatch:RegisterListener(adminRetract.userdata) adminRetract:SetDisabled(true) @@ -573,9 +555,9 @@ function CreateGUI() -- special registration procedure to be closable with the escape button - --escapeButton.shown = true - --_G["BSK_ESCAPEBUTTON"] = escapeButton - --table.insert(_G.UISpecialFrames, "BSK_ESCAPEBUTTON") + escapeButton.shown = true + _G["BSK_ESCAPEBUTTON"] = escapeButton + table.insert(_G.UISpecialFrames, "BSK_ESCAPEBUTTON") if f then return end -- no second gui please f = AceGUI:Create("Frame")