Changeset 6858 for code/branches/skybox2/src/modules/overlays/hud
- Timestamp:
- May 6, 2010, 1:11:43 PM (15 years ago)
- Location:
- code/branches/skybox2/src/modules/overlays/hud
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.cc
r6772 r6858 30 30 31 31 #include "util/Convert.h" 32 #include "core/Co re.h"32 #include "core/ConsoleCommand.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "infos/GametypeInfo.h" … … 39 39 namespace orxonox 40 40 { 41 CreateFactory(GametypeStatus); 41 CreateFactory(GametypeStatus); 42 43 /*static*/ bool GametypeStatus::noCaption_s = false; 44 SetConsoleCommand(GametypeStatus, setGametypeStatus, true); 42 45 43 46 GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator) … … 61 64 ControllableEntity* ce = this->owner_->getControllableEntity(); 62 65 63 if(!Core::getInstance().hasGametypeCaptions()) // No captions are displayed. 66 if(GametypeStatus::noCaption_s) // No captions are displayed. 67 { 68 this->setCaption(""); 64 69 return; 70 } 65 71 66 72 if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning()) … … 92 98 this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner()); 93 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 94 112 } -
code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.h
r5781 r6858 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.