Changeset 6994 for code/branches/presentation3/src/modules/overlays
- Timestamp:
- May 27, 2010, 10:31:25 PM (14 years ago)
- Location:
- code/branches/presentation3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3
- Property svn:mergeinfo changed
/code/branches/skybox2 (added) merged: 6559,6616,6619,6673,6771-6772,6804,6806,6858,6861,6936,6972-6974,6988-6989
- Property svn:mergeinfo changed
-
code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.cc
r5781 r6994 30 30 31 31 #include "util/Convert.h" 32 #include "core/ConsoleCommand.h" 32 33 #include "core/CoreIncludes.h" 33 34 #include "infos/GametypeInfo.h" … … 38 39 namespace orxonox 39 40 { 40 CreateFactory(GametypeStatus); 41 CreateFactory(GametypeStatus); 42 43 /*static*/ bool GametypeStatus::noCaption_s = false; 44 SetConsoleCommand(GametypeStatus, setGametypeStatus, true); 41 45 42 46 GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator) … … 59 63 const GametypeInfo* gtinfo = this->owner_->getGametypeInfo(); 60 64 ControllableEntity* ce = this->owner_->getControllableEntity(); 65 66 if(GametypeStatus::noCaption_s) // No captions are displayed. 67 { 68 this->setCaption(""); 69 return; 70 } 61 71 62 72 if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning()) … … 88 98 this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner()); 89 99 } 100 101 /** 102 @brief 103 Sets whether the gametype status is displayed. 104 @param bValue 105 If true captions are displayed, if false, not. 106 */ 107 /*static*/ void GametypeStatus::setGametypeStatus(bool bValue) 108 { 109 GametypeStatus::noCaption_s = !bValue; 110 } 111 90 112 } -
code/branches/presentation3/src/modules/overlays/hud/GametypeStatus.h
r5781 r6994 46 46 virtual void changedOwner(); 47 47 48 static void setGametypeStatus(bool bValue); //!< Toggles whether the gametype status is displayed. 49 48 50 private: 49 51 PlayerInfo* owner_; 52 static bool noCaption_s; 53 50 54 }; 51 55 }
Note: See TracChangeset
for help on using the changeset viewer.