Changeset 8378 for code/branches/tutoriallevel2
- Timestamp:
- May 2, 2011, 1:58:12 PM (14 years ago)
- Location:
- code/branches/tutoriallevel2
- Files:
-
- 3 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 -
code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.cc
r8374 r8378 367 367 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.resizeQueue(\"info\", 0.6, 0, " + multi_cast<std::string>(infoQueue->getMaxSize()) + ")"); 368 368 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.moveQueue(\"info\", 0.2, 0, 0.8, 0)"); 369 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changeQueueAlignment(\"info\", \"HorzCentred\")"); 369 370 } 370 371 -
code/branches/tutoriallevel2/src/orxonox/interfaces/NotificationListener.h
r8377 r8378 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Damian 'Mozork' Frick 24 24 * Co-authors: 25 25 * ... … … 66 66 } 67 67 68 // TODO: Update doc. 68 69 /** 69 70 @brief … … 74 75 75 76 @author 76 Fabian 'x3n' Landau77 77 Damian 'Mozork' Frick 78 78 79 @ingroup Notifications 79 80 */ … … 90 91 static void sendNotificationHelper(const std::string& message, const std::string& sender, unsigned int messageMode); 91 92 92 virtual bool registerNotification(const std::string& message, const std::string& sender) 93 { return false; } 93 virtual bool registerNotification(const std::string& message, const std::string& sender) { return false; } 94 94 virtual void executeCommand(const std::string& command, const std::string& sender) {} 95 95 };
Note: See TracChangeset
for help on using the changeset viewer.