Changeset 8906 for code/branches/hud/src
- Timestamp:
- Oct 26, 2011, 4:10:30 PM (13 years ago)
- Location:
- code/branches/hud/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/modules/overlays/hud/HUDNavigation.cc
r8897 r8906 173 173 // Get Distance to HumanController and save it in the TextAreaOverlayElement. 174 174 int dist = listIt->second; 175 it->second.text_->setCaption ( multi_cast<std::string> ( dist ) ); 176 float textLength = multi_cast<std::string> ( dist ).size() * it->second.text_->getCharHeight() * 0.3f; 175 176 //it->second.text_->setCaption ( multi_cast<std::string> ( dist ) ); //display distance next to cursor 177 //float textLength = multi_cast<std::string> ( dist ).size() * it->second.text_->getCharHeight() * 0.3f; 178 179 it->second.text_->setCaption(it->first->getRVName()); //display name next to cursor 180 float textLength = it->first->getRVName().size() * it->second.text_->getCharHeight() * 0.3f; 177 181 178 182 // Transform to screen coordinates … … 191 195 else 192 196 outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0; 193 // Get Distance to HumanController and save it in the TextAreaOverlayElement.194 //it->second.text_->setCaption ( multi_cast<std::string> ( dist ) );195 it->second.text_->setCaption(it->first->getRVName()); //only for test purposes196 197 197 198 if ( outOfView ) -
code/branches/hud/src/orxonox/infos/PlayerInfo.cc
r8896 r8906 171 171 172 172 this->changedControllableEntity(); 173 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(entity); 174 if (spaceship != NULL) 175 { 176 spaceship->setRVName(this->getName()); 177 } 173 178 } 174 179 … … 190 195 191 196 this->changedControllableEntity(); 192 193 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(entity);194 if (spaceship != NULL)195 {196 spaceship->setRVName(this->getName());197 }198 197 } 199 198 -
code/branches/hud/src/orxonox/interfaces/RadarViewable.h
r8896 r8906 69 69 } 70 70 } 71 72 71 std::string getRVName() const 73 72 { return this->RVName; }
Note: See TracChangeset
for help on using the changeset viewer.