comparison Gui.lua @ 70:236117ab8a49

Decent sketch of what the communication system might look like
author John@Yosemite-PC
date Thu, 29 Mar 2012 23:24:51 -0400
parents b7352f007028
children d5e2dfe0c269
comparison
equal deleted inserted replaced
69:b7352f007028 70:236117ab8a49
58 { 58 {
59 shown = false, 59 shown = false,
60 ["IsShown"] = function(self) return self.shown end, 60 ["IsShown"] = function(self) return self.shown end,
61 ["Hide"] = function(self) if f then AceGUI:Release(f); self.shown=false end end 61 ["Hide"] = function(self) if f then AceGUI:Release(f); self.shown=false end end
62 } 62 }
63
64 63
65 SelectorListEventDispatcher = 64 SelectorListEventDispatcher =
66 { 65 {
67 listeners = nil, 66 listeners = nil,
68 target = nil, 67 target = nil,
360 function(widget) 359 function(widget)
361 if widget.userdata.state then -- we were bidding when the button was pressed 360 if widget.userdata.state then -- we were bidding when the button was pressed
362 biddingZone:ReleaseChildren() 361 biddingZone:ReleaseChildren()
363 widget:SetText("Open Bids") 362 widget:SetText("Open Bids")
364 RListEventDispatch:Release() 363 RListEventDispatch:Release()
364 RListPopulator:Release()
365 else 365 else
366 widget:SetText("Close bids") 366 widget:SetText("Close bids")
367 local spacer = AceGUI:Create("Label") 367 local spacer = AceGUI:Create("Label")
368 spacer:SetText(" ") 368 spacer:SetText(" ")
369 spacer:SetFullWidth(true) 369 spacer:SetFullWidth(true)
387 bidTitle:SetFullWidth(true) 387 bidTitle:SetFullWidth(true)
388 388
389 local bidRetractButton = AceGUI:Create("Button") 389 local bidRetractButton = AceGUI:Create("Button")
390 bidRetractButton:SetText("Place Bid") 390 bidRetractButton:SetText("Place Bid")
391 bidRetractButton:SetWidth(100) 391 bidRetractButton:SetWidth(100)
392 bidRetractButton:SetCallback("OnClick", function(widget) RListPopulator:Force(SListPopulator:GetMe()) end) 392 bidRetractButton:SetCallback("OnClick", function(widget) RListPopulator:Force(SListPopulator:GetMe()) end) -- todo: Force is not the desired thing here.
393 local rollButton = AceGUI:Create("Button") 393 local rollButton = AceGUI:Create("Button")
394 rollButton:SetText("Offset Roll") 394 rollButton:SetText("Offset Roll")
395 rollButton:SetWidth(100) 395 rollButton:SetWidth(100)
396 396
397 RListEventDispatch:SetTarget(b1) 397 RListEventDispatch:SetTarget(b1)