Changeset 6868
- Timestamp:
- May 10, 2010, 1:23:04 PM (15 years ago)
- Location:
- code/branches/hudelements/src/modules/overlays/hud
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hudelements/src/modules/overlays/hud/HUDNavigation.cc
r6865 r6868 72 72 this->wasOutOfView_ = true; // Ensure the material is changed right the first time.. 73 73 74 setFont("Monofur"); 75 setTextSize(0.05f); 76 setNavMarkerSize(0.05f); 77 setAimMarkerSize(0.04f); 74 78 75 */ 79 76 /* … … 86 83 87 84 85 setFont("Monofur"); 86 setTextSize(0.05f); 87 setNavMarkerSize(0.05f); 88 // setAimMarkerSize(0.04f); 88 89 } 89 90 … … 110 111 void HUDNavigation::setFont(const std::string& font) 111 112 { 112 if (this->navText_ && !font.empty()) 113 this->navText_->setFontName(font); 113 fontName_ = font; 114 if(!activeObjectList_.empty()) 115 { 116 for(tempRadarViewable = activeObjectList_.begin(); tempRadarViewable!=activeObjectList_.end(); ++tempRadarViewable) 117 { 118 if (tempRadarViewable->second.second && !fontName_.empty()) 119 tempRadarViewable->second.second->setFontName(fontName_); 120 } 121 } 114 122 } 115 123 116 124 const std::string& HUDNavigation::getFont() const 117 125 { 118 if (this->navText_) 119 return this->navText_->getFontName(); 120 else 121 return BLANKSTRING; 126 return fontName_; 122 127 } 123 128 124 129 void HUDNavigation::setTextSize(float size) 125 130 { 126 if (this->navText_ && size >= 0.0f) 127 this->navText_->setCharHeight(size); 131 textSize_ = size; 132 if(!activeObjectList_.empty()) 133 { 134 for(tempRadarViewable = activeObjectList_.begin(); tempRadarViewable!=activeObjectList_.end(); ++tempRadarViewable) 135 { 136 if (tempRadarViewable->second.second && size >= 0.0f) 137 tempRadarViewable->second.second->setCharHeight(size); 138 } 139 } 128 140 } 129 141 130 142 float HUDNavigation::getTextSize() const 131 143 { 132 if (this->navText_) 133 return this->navText_->getCharHeight(); 134 else 135 return 0.0f; 144 return textSize_; 136 145 } 137 146 -
code/branches/hudelements/src/modules/overlays/hud/HUDNavigation.h
r6865 r6868 57 57 inline float getRadarSensitivity() const{} 58 58 inline void radarTick(float dt) {} 59 59 60 60 61 private: 61 62 63 64 62 65 void sizeChanged(); 63 66 void angleChanged() { } … … 104 107 activeObjectListType::iterator tempRadarViewable; 105 108 109 std::string fontName_; 110 int textSize_; 111 106 112 }; 107 113
Note: See TracChangeset
for help on using the changeset viewer.