Changeset 2019 for code/branches/objecthierarchy/src/orxonox/overlays/hud
- Timestamp:
- Oct 27, 2008, 4:08:51 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/overlays/hud
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc
r2012 r2019 39 39 40 40 #include "GraphicsEngine.h" 41 #include " objects/infos/Level.h"41 #include "LevelManager.h" 42 42 #include "objects/infos/PlayerInfo.h" 43 43 #include "overlays/console/InGameConsole.h" … … 50 50 CreateFactory(ChatOverlay); 51 51 52 ChatOverlay::ChatOverlay( )52 ChatOverlay::ChatOverlay(BaseObject* creator) : OverlayText(creator) 53 53 { 54 54 RegisterObject(ChatOverlay); … … 76 76 std::string name = "unknown"; 77 77 78 PlayerInfo* player = Level ::getClient(senderID);78 PlayerInfo* player = LevelManager::getInstance().getClient(senderID); 79 79 if (player) 80 80 name = player->getName(); -
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h
r1968 r2019 42 42 { 43 43 public: 44 ChatOverlay( );44 ChatOverlay(BaseObject* creator); 45 45 ~ChatOverlay(); 46 46 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDBar.cc
r1854 r2019 38 38 39 39 #include "util/Convert.h" 40 #include "util/String.h" 40 41 #include "core/CoreIncludes.h" 41 42 #include "core/XMLPort.h" … … 45 46 CreateFactory(BarColour); 46 47 47 BarColour::BarColour() 48 : position_(0.0) 48 BarColour::BarColour(BaseObject* creator) : BaseObject(creator), position_(0.0) 49 49 { 50 50 RegisterObject(BarColour); … … 63 63 unsigned int HUDBar::materialcount_s = 0; 64 64 65 HUDBar::HUDBar() 66 : bar_(0) 67 , textureUnitState_(0) 65 HUDBar::HUDBar(BaseObject* creator) : OrxonoxOverlay(creator), bar_(0), textureUnitState_(0) 68 66 { 69 67 RegisterObject(HUDBar); … … 92 90 93 91 this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 94 .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberStr ()));92 .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberString())); 95 93 this->bar_->setMaterialName(materialname); 96 94 this->background_->addChild(bar_); -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDBar.h
r1747 r2019 44 44 { 45 45 public: 46 BarColour( );46 BarColour(BaseObject* creator); 47 47 ~BarColour() { } 48 48 … … 64 64 { 65 65 public: 66 HUDBar( );66 HUDBar(BaseObject* creator); 67 67 virtual ~HUDBar(); 68 68 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDNavigation.cc
r1993 r2019 46 46 CreateFactory(HUDNavigation); 47 47 48 HUDNavigation::HUDNavigation() 49 : navMarker_(0) 48 HUDNavigation::HUDNavigation(BaseObject* creator) 49 : OrxonoxOverlay(creator) 50 , navMarker_(0) 50 51 , aimMarker_(0) 51 52 , navText_(0) … … 72 73 // create nav text 73 74 navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton() 74 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberStr ()));75 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString())); 75 76 76 77 // create nav marker 77 78 navMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 78 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberStr ()));79 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString())); 79 80 navMarker_->setMaterialName("Orxonox/NavArrows"); 80 81 wasOutOfView_ = true; // just to ensure the material is changed right the first time.. … … 82 83 // create aim marker 83 84 aimMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 84 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr ()));85 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberString())); 85 86 aimMarker_->setMaterialName("Orxonox/NavCrosshair"); 86 87 … … 112 113 return this->navText_->getFontName(); 113 114 else 114 return blankString;115 return BLANKSTRING; 115 116 } 116 117 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDNavigation.h
r1747 r2019 41 41 { 42 42 public: 43 HUDNavigation( );43 HUDNavigation(BaseObject* creator); 44 44 ~HUDNavigation(); 45 45 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDRadar.cc
r1916 r2019 35 35 36 36 #include "util/Math.h" 37 #include "util/String.h" 37 38 #include "core/ConsoleCommand.h" 38 39 #include "core/CoreIncludes.h" … … 45 46 CreateFactory(HUDRadar); 46 47 47 HUDRadar::HUDRadar() 48 : marker_(0) 48 HUDRadar::HUDRadar(BaseObject* creator) : OrxonoxOverlay(creator), marker_(0) 49 49 { 50 50 RegisterObject(HUDRadar); … … 69 69 { 70 70 marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 71 .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberStr ()));71 .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberString())); 72 72 marker_->setMaterialName("Orxonox/RadarMarker"); 73 73 overlay_->add2D(marker_); … … 107 107 // we have to create a new entry 108 108 panel = static_cast<Ogre::PanelOverlayElement*>( 109 Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberStr ()));109 Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString())); 110 110 radarDots_.push_back(panel); 111 111 // get right material -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDRadar.h
r1819 r2019 45 45 { 46 46 public: 47 HUDRadar( );47 HUDRadar(BaseObject* creator); 48 48 ~HUDRadar(); 49 49 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDSpeedBar.cc
r1916 r2019 36 36 CreateFactory(HUDSpeedBar); 37 37 38 HUDSpeedBar::HUDSpeedBar( )38 HUDSpeedBar::HUDSpeedBar(BaseObject* creator) : HUDBar(creator) 39 39 { 40 40 RegisterObject(HUDSpeedBar); -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDSpeedBar.h
r1747 r2019 41 41 { 42 42 public: 43 HUDSpeedBar( );43 HUDSpeedBar(BaseObject* creator); 44 44 ~HUDSpeedBar(); 45 45
Note: See TracChangeset
for help on using the changeset viewer.