Mercurial > wow > breuesk
comparison Gui.lua @ 81:62805e6b46c5
Fleshing out the UI for those without the addon. Announcements in the raid, bidding via whisper.
author | John@Yosemite-PC |
---|---|
date | Fri, 13 Apr 2012 22:09:17 -0400 |
parents | 7b8fcea357d2 |
children | db7e4ee34dce |
comparison
equal
deleted
inserted
replaced
80:40c882db34f8 | 81:62805e6b46c5 |
---|---|
106 | 106 |
107 SListEventDispatch = SelectorListEventDispatcher:new() | 107 SListEventDispatch = SelectorListEventDispatcher:new() |
108 LListEventDispatch = SelectorListEventDispatcher:new() | 108 LListEventDispatch = SelectorListEventDispatcher:new() |
109 RListEventDispatch = SelectorListEventDispatcher:new() | 109 RListEventDispatch = SelectorListEventDispatcher:new() |
110 | 110 |
111 function ConvertLe2Line(le) | |
112 local line = {value=le:GetId(),text=le:GetName(),icon=[[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]]} | |
113 line.iconCoords=_G.CLASS_ICON_TCOORDS[le:GetClass()] | |
114 line.textPlain = line.text | |
115 line.text=colorize(line.text,_G.RAID_CLASS_COLORS[le:GetClass()]) | |
116 return line | |
117 end | |
118 | |
111 local SListPopulator = | 119 local SListPopulator = |
112 { | 120 { |
113 filtered = false, | 121 filtered = false, |
114 widget = nil, | 122 widget = nil, |
115 swidget = nil, | 123 swidget = nil, |
121 if self.lref == nil or self.widget == nil then return end -- don't do work if not fully initialized | 129 if self.lref == nil or self.widget == nil then return end -- don't do work if not fully initialized |
122 self.data = {} | 130 self.data = {} |
123 for le in self.lref:OrderedListEntryIter() do | 131 for le in self.lref:OrderedListEntryIter() do |
124 local disabled = not PersonList:IsActive(le:GetId()) | 132 local disabled = not PersonList:IsActive(le:GetId()) |
125 if not self.filtered or not disabled then | 133 if not self.filtered or not disabled then |
126 local line = {value=le:GetId(),text=le:GetName(),icon=[[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]]} | 134 local line = ConvertLe2Line(le) |
127 line.iconCoords=_G.CLASS_ICON_TCOORDS[le:GetClass()] | |
128 line.textPlain = line.text | |
129 line.text=colorize(line.text,_G.RAID_CLASS_COLORS[le:GetClass()]) | |
130 line.disabled = disabled | 135 line.disabled = disabled |
131 table.insert(self.data,line) | 136 table.insert(self.data,line) |
132 end | 137 end |
133 end | 138 end |
134 self.widget:SetList(self.data) | 139 self.widget:SetList(self.data) |
538 self.openButton:SetDisabled(false) | 543 self.openButton:SetDisabled(false) |
539 self.openButton:SetText("Cancel Bidding") | 544 self.openButton:SetText("Cancel Bidding") |
540 self.openButton:SetCallback("OnClick", function(widget) InitiateCloseBidding() end) | 545 self.openButton:SetCallback("OnClick", function(widget) InitiateCloseBidding() end) |
541 self.assignButton:SetText("Finish & Assign") | 546 self.assignButton:SetText("Finish & Assign") |
542 self.assignButton:SetDisabled(not (getn(staterolls) > 0 or getn(statebids) > 0)) | 547 self.assignButton:SetDisabled(not (getn(staterolls) > 0 or getn(statebids) > 0)) |
543 self.assignButton:SetCallback("OnClick", function(widget) ExpensiveLoot(LListEventDispatch:LatestValue(),SListPopulator.lref) end) | 548 self.assignButton:SetCallback("OnClick", function(widget) ExpensiveLoot(LListEventDispatch:LatestValue(),SListPopulator.lref) end) -- todo: problem here - use stateitem instead |
544 self.suicideButton:SetText(" ") | 549 self.suicideButton:SetText(" ") |
545 self.suicideButton:SetDisabled(true) | 550 self.suicideButton:SetDisabled(true) |
546 | 551 |
547 -- change open button to cancel | 552 -- change open button to cancel |
548 -- change assign button to award | 553 -- change assign button to award |