Changeset 8651
- Timestamp:
- May 28, 2011, 10:11:23 PM (14 years ago)
- Location:
- code/branches/presentation/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/modules/notifications/NotificationQueue.cc
r8637 r8651 52 52 The creator of the NotificationQueue. 53 53 */ 54 NotificationQueue::NotificationQueue(BaseObject* creator) : BaseObject(creator), registered_(false)54 NotificationQueue::NotificationQueue(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), registered_(false) 55 55 { 56 56 RegisterObject(NotificationQueue); 57 57 58 58 this->initialize(); 59 this->registerVariables(); 59 60 } 60 61 … … 161 162 this->create(); 162 163 } 164 165 166 /** 167 @brief 168 Registers Variables to be Synchronised. 169 Registers Variables which have to be synchronised to the network system. 170 */ 171 void NotificationQueue::registerVariables() 172 { 173 registerVariable( this->maxSize_, VariableDirection::ToClient ); 174 registerVariable( this->targets_, VariableDirection::ToClient ); 175 registerVariable( this->displayTime_, VariableDirection::ToClient ); 176 } 177 163 178 164 179 /** -
code/branches/presentation/src/modules/notifications/NotificationQueue.h
r8637 r8651 47 47 #include "core/BaseObject.h" 48 48 #include "tools/interfaces/Tickable.h" 49 #include "network/synchronisable/Synchronisable.h" 49 50 50 51 namespace orxonox … … 89 90 @ingroup Notifications 90 91 */ 91 class _NotificationsExport NotificationQueue : public BaseObject, public Tickable 92 class _NotificationsExport NotificationQueue : public BaseObject, public Tickable, public Synchronisable 92 93 { 93 94 … … 99 100 virtual void tick(float dt); // To update from time to time. 100 101 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 101 102 void registerVariables(); 103 102 104 void update(void); // Updates the NotificationQueue. 103 105 void update(Notification* notification, const std::time_t & time); // Updates the NotificationQueue by adding an new Notification. -
code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.cc
r8645 r8651 59 59 60 60 this->initialize(); 61 this->registerVariables(); 61 62 } 62 63 … … 90 91 XMLPortParam(NotificationQueueCEGUI, "alignment", setAlignment, getAlignment, xmlelement, mode); 91 92 XMLPortParam(NotificationQueueCEGUI, "displaySize", setDisplaySize, getDisplaySize, xmlelement, mode); 93 } 94 95 void NotificationQueueCEGUI::registerVariables() 96 { 97 registerVariable( this->position_, VariableDirection::ToClient ); 98 registerVariable( this->fontSize_, VariableDirection::ToClient ); 99 registerVariable( this->fontColor_, VariableDirection::ToClient ); 100 registerVariable( this->alignment_, VariableDirection::ToClient ); 101 registerVariable( this->displaySize_, VariableDirection::ToClient ); 92 102 } 93 103 -
code/branches/presentation/src/modules/notifications/NotificationQueueCEGUI.h
r8645 r8651 74 74 75 75 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 76 void registerVariables(); 76 77 77 78 void destroy(bool noGraphics = false); // Destroys the NotificationQueue. -
code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
r8648 r8651 118 118 XMLPortParamVariable(SpaceShip, "boostRate", boostRate_, xmlelement, mode); 119 119 XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode); 120 120 XMLPortParamVariable(SpaceShip, "shakeFrequency", shakeFrequency_, xmlelement, mode); 121 121 XMLPortParamVariable(SpaceShip, "shakeAmplitude", shakeAmplitude_, xmlelement, mode); 122 122 XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode); 123 123 XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode); 124 124
Note: See TracChangeset
for help on using the changeset viewer.