Changeset 2386 for code/branches/overlay/src/orxonox/overlays/stats
- Timestamp:
- Dec 10, 2008, 4:23:21 PM (16 years ago)
- Location:
- code/branches/overlay/src/orxonox/overlays/stats
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/overlay/src/orxonox/overlays/stats/CreateLines.cc
r2320 r2386 67 67 Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr(); 68 68 69 unsigned int colIndex = 0; 70 69 71 while (textColumns_.size() < numberOfColumns) { 70 72 71 Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + convertToString(lineIndex) ));73 Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + convertToString(lineIndex) + convertToString(colIndex))); 72 74 textColumns_.push_back(tempTextArea); 73 75 this->background_->addChild(tempTextArea); 76 77 colIndex++; 74 78 75 79 } -
code/branches/overlay/src/orxonox/overlays/stats/Scoreboard.cc
r2320 r2386 52 52 { 53 53 RegisterObject(Scoreboard); 54 55 createlines_ = new CreateLines(this); 56 // this->gametype_ = new Gametype(this); 57 } 58 59 /** 60 @brief Initializes the lines. 61 */ 62 void Scoreboard::XMLPort(Element& xmlElement, XMLPort::Mode mode) 63 { 64 SUPER(Scoreboard, XMLPort, xmlElement, mode); 65 66 printLines(); 67 68 COUT(0) << "XMLPort executed." << std::endl; 69 54 70 } 55 71 … … 60 76 61 77 numberOfColumns = 2; 62 numberOfLines = this->gametype_->getNumberOfPlayers();63 columnIndex = 0;64 topOffset = 0. 3;78 // numberOfLines = this->gametype_->getNumberOfPlayers(); 79 numberOfLines = 3; 80 topOffset = 0.1; 65 81 lineSpacing = 0.1; 66 82 67 83 for (unsigned int i = 0; i < numberOfLines; i++) { 68 84 69 leftOffset = 0.3; 85 columnIndex = 0; 86 leftOffset = 0.1; 70 87 71 88 this->createlines_->setNumberOfColumns(numberOfColumns, i); 72 89 73 columnText = this->gametype_->getPlayersName(); 90 // columnText = this->gametype_->getPlayersName(); 91 columnText = "PlayerName"; 74 92 this->createlines_->alignColumn(columnIndex, topOffset, leftOffset); 75 93 this->createlines_->setColumnText(columnIndex, columnText); 76 94 77 95 columnIndex++; 78 leftOffset = leftOffset + 0. 4;96 leftOffset = leftOffset + 0.3; 79 97 80 columnText = this->gametype_->getPlayersFrags(); 98 // columnText = this->gametype_->getPlayersFrags(); 99 columnText = "PlayerFrags"; 81 100 this->createlines_->alignColumn(columnIndex, topOffset, leftOffset); 82 101 this->createlines_->setColumnText(columnIndex, columnText); -
code/branches/overlay/src/orxonox/overlays/stats/Scoreboard.h
r2320 r2386 47 47 ~Scoreboard() {} 48 48 49 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 50 49 51 inline void setGametype(Gametype* gt) 50 52 { this->gametype_ = gt; } -
code/branches/overlay/src/orxonox/overlays/stats/Stats.cc
r2200 r2386 101 101 } 102 102 103 /**104 @brief Used to control the actual scrolling and the cursor.105 */106 107 103 void Stats::tick(float dt) 108 104 {
Note: See TracChangeset
for help on using the changeset viewer.