Changeset 8450 for code/branches/tutoriallevel2/src/modules
- Timestamp:
- May 12, 2011, 12:11:53 AM (14 years ago)
- Location:
- code/branches/tutoriallevel2/src/modules
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/src/modules/notifications/NotificationQueueCEGUI.cc
r8449 r8450 49 49 // Register tolua_open function when loading the library. 50 50 DeclareToluaInterface(Notifications); 51 52 /*static*/ const std::string NotificationQueueCEGUI::NOTIFICATION_LAYER("NotificationLayer"); 51 53 52 54 NotificationQueueCEGUI::NotificationQueueCEGUI(const std::string& name, const std::string& senders, unsigned int size, unsigned int displayTime) : NotificationQueue(name, senders, size, displayTime) … … 81 83 // Remove the NotificationQueue in lua. 82 84 if(GameMode::showsGraphics() && !noGraphics) 83 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.removeQueue(\"" + this->getName() + "\")");85 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".removeQueue(\"" + this->getName() + "\")"); 84 86 85 87 NotificationQueue::destroy(); … … 110 112 this->displaySize_ = size; 111 113 if(size.z == 0.0 && size.w == 0.0) 112 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ")");114 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ")"); 113 115 else 114 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ", " + multi_cast<std::string>(this->displaySize_.z) + ", " + multi_cast<std::string>(this->displaySize_.w) + ")");116 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".resizeQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->displaySize_.x) + ", " + multi_cast<std::string>(this->displaySize_.y) + ", " + multi_cast<std::string>(this->displaySize_.z) + ", " + multi_cast<std::string>(this->displaySize_.w) + ")"); 115 117 } 116 118 … … 137 139 138 140 this->position_ = position; 139 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.moveQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->position_.x) + ", " + multi_cast<std::string>(this->position_.y) + ", " + multi_cast<std::string>(this->position_.z) + ", " + multi_cast<std::string>(this->position_.w) + ")");141 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".moveQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->position_.x) + ", " + multi_cast<std::string>(this->position_.y) + ", " + multi_cast<std::string>(this->position_.z) + ", " + multi_cast<std::string>(this->position_.w) + ")"); 140 142 } 141 143 … … 154 156 // TODO: Check whether the alignment string is correct? 155 157 this->alignment_ = alignment; 156 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.changeQueueAlignment(\"" + this->getName() + "\", \"" + this->alignment_ + "\")");158 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueAlignment(\"" + this->getName() + "\", \"" + this->alignment_ + "\")"); 157 159 } 158 160 … … 169 171 170 172 this->fontSize_ = size; 171 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.changeQueueFontSize(\"" + this->getName() + "\", " + multi_cast<std::string>(this->fontSize_) + ")");173 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontSize(\"" + this->getName() + "\", " + multi_cast<std::string>(this->fontSize_) + ")"); 172 174 } 173 175 … … 189 191 stream << std::hex << std::setw(2) << std::setfill('0') << int(this->fontColor_[(i+3)%4]*255); 190 192 this->fontColorStr_ = stream.str(); 191 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.changeQueueFontColor(\"" + this->getName() + "\", \"" + this->fontColorStr_ + "\")");193 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".changeQueueFontColor(\"" + this->getName() + "\", \"" + this->fontColorStr_ + "\")"); 192 194 } 193 195 … … 218 220 // Push the Notification to the GUI. 219 221 if(GameMode::showsGraphics()) 220 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.pushNotification(\"" + this->getName() + "\", \"" + notification->getMessage() + "\")");222 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".pushNotification(\"" + this->getName() + "\", \"" + notification->getMessage() + "\")"); 221 223 } 222 224 … … 229 231 // Pops the Notification from the GUI. 230 232 if(GameMode::showsGraphics()) 231 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.popNotification(\"" + this->getName() + "\")");233 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".popNotification(\"" + this->getName() + "\")"); 232 234 } 233 235 … … 240 242 // Removes the Notification from the GUI. 241 243 if(GameMode::showsGraphics()) 242 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.removeNotification(\"" + this->getName() + "\", " + multi_cast<std::string>(index) + ")");244 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".removeNotification(\"" + this->getName() + "\", " + multi_cast<std::string>(index) + ")"); 243 245 } 244 246 … … 255 257 // Clear the NotificationQueue in the GUI. 256 258 if(GameMode::showsGraphics() && !noGraphics) 257 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.clearQueue(\"" + this->getName() + "\")");259 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".clearQueue(\"" + this->getName() + "\")"); 258 260 } 259 261 … … 265 267 { 266 268 if(GameMode::showsGraphics()) 267 GUIManager::getInstance().getLuaState()->doString( "NotificationLayer.createQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getMaxSize()) + ")");269 GUIManager::getInstance().getLuaState()->doString(NotificationQueueCEGUI::NOTIFICATION_LAYER + ".createQueue(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getMaxSize()) + ")"); 268 270 } 269 271 -
code/branches/tutoriallevel2/src/modules/notifications/NotificationQueueCEGUI.h
r8448 r8450 127 127 { return this->fontColorStr_; } 128 128 129 static NotificationQueueCEGUI* getQueue(const std::string& name); // tolua_export 129 static NotificationQueueCEGUI* getQueue(const std::string& name); // tolua_export // Get the NotificationQueueCEGUI with the input name. 130 130 131 131 protected: … … 135 135 136 136 virtual void clear(bool noGraphics = false); // Clears the NotificationQueue by removing all NotificationContainers. 137 138 protected: 139 static const std::string NOTIFICATION_LAYER; //!< The name of the NotificationLayer menu sheet. 137 140 138 141 private: -
code/branches/tutoriallevel2/src/modules/overlays/hud/CMakeLists.txt
r8178 r8450 7 7 HUDTimer.cc 8 8 ChatOverlay.cc 9 GametypeStatus.cc10 9 AnnounceMessage.cc 11 10 KillMessage.cc
Note: See TracChangeset
for help on using the changeset viewer.