diff 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
line wrap: on
line diff
--- a/Gui.lua	Fri Apr 13 00:02:56 2012 -0400
+++ b/Gui.lua	Fri Apr 13 22:09:17 2012 -0400
@@ -108,6 +108,14 @@
 LListEventDispatch = SelectorListEventDispatcher:new()
 RListEventDispatch = SelectorListEventDispatcher:new()
 
+function ConvertLe2Line(le)
+    local line = {value=le:GetId(),text=le:GetName(),icon=[[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]]}
+    line.iconCoords=_G.CLASS_ICON_TCOORDS[le:GetClass()]
+    line.textPlain = line.text
+    line.text=colorize(line.text,_G.RAID_CLASS_COLORS[le:GetClass()])
+    return line
+end
+
 local SListPopulator =
 {
     filtered = false,
@@ -123,10 +131,7 @@
         for le in self.lref:OrderedListEntryIter() do
             local disabled = not PersonList:IsActive(le:GetId()) 
             if not self.filtered or not disabled then
-                local line = {value=le:GetId(),text=le:GetName(),icon=[[Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes]]}
-                line.iconCoords=_G.CLASS_ICON_TCOORDS[le:GetClass()]
-                line.textPlain = line.text
-                line.text=colorize(line.text,_G.RAID_CLASS_COLORS[le:GetClass()])
+                local line = ConvertLe2Line(le)
                 line.disabled = disabled
                 table.insert(self.data,line)
             end
@@ -540,7 +545,7 @@
             self.openButton:SetCallback("OnClick", function(widget) InitiateCloseBidding() end)
             self.assignButton:SetText("Finish & Assign")
             self.assignButton:SetDisabled(not (getn(staterolls) > 0 or getn(statebids) > 0))
-            self.assignButton:SetCallback("OnClick", function(widget) ExpensiveLoot(LListEventDispatch:LatestValue(),SListPopulator.lref) end)
+            self.assignButton:SetCallback("OnClick", function(widget) ExpensiveLoot(LListEventDispatch:LatestValue(),SListPopulator.lref) end) -- todo: problem here - use stateitem instead
             self.suicideButton:SetText(" ")
             self.suicideButton:SetDisabled(true)