Changeset 8378 for code/branches/tutoriallevel2/data/gui
- Timestamp:
- May 2, 2011, 1:58:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/data/gui/scripts/NotificationLayer.lua
r8377 r8378 32 32 ["fontSize"] = 12, 33 33 ["fontColor"] = "FFFFFFFF", 34 ["alignment"] = "LeftAligned", 34 35 ["items"] = {}, 35 36 ["first"] = 1, … … 79 80 item:setProperty("BackgroundEnabled", "false") 80 81 item:setProperty("FrameEnabled", "false") 82 item:setProperty("HorzFormatting", queue.alignment) 81 83 queue.items[queue.last] = item 82 84 queue.last = queue.last+1 … … 215 217 end 216 218 219 function P.changeQueueAlignment(queueName, alignment) 220 local queue = P.queueList[queueName] 221 local queueWindow = queue.window 222 if queueWindow == nil then 223 return 224 end 225 226 queue.alignment = alignment 227 local item = nil 228 for i=queue.first,queue.last-1 do 229 item = queue.items[i] 230 item:setProperty("HorzFormatting", queue.alignment) 231 end 232 end 233 217 234 -- Helper function to set the font size and color of a item of a queue. 218 235 -- The parameters are (in order) 'the ListboxItem', 'the queue table', 'whether color should be changed as well' … … 228 245 if changeColor then 229 246 item:setProperty("TextColours", "tl:" .. queue.fontColor .. " tr:" .. queue.fontColor .. " bl:" .. queue.fontColor .. " br:" .. queue.fontColor .. "") 230 cout(0, "tl:[" .. queue.fontColor .. "] tr:[" .. queue.fontColor .. "] bl:[" .. queue.fontColor .. "] br:[" .. queue.fontColor .. "]")231 247 end 232 248 end
Note: See TracChangeset
for help on using the changeset viewer.