Changeset 8542 in orxonox.OLD for branches/gui/src/lib/graphics
- Timestamp:
- Jun 16, 2006, 5:22:18 PM (19 years ago)
- Location:
- branches/gui/src/lib/graphics/text_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/graphics/text_engine/limited_width_text.cc
r8539 r8542 40 40 { 41 41 this->_lineWidth = lineWidth; 42 this->setSizeX2D(lineWidth); 42 this->setupTextWidth(); 43 } 44 45 /** 46 * @brief sets the Dots Position 47 * @param dotsPosition the Position of the Dots 48 */ 49 void LimitedWidthText::setDotsPosition(DotsPosition dotsPosition) 50 { 51 this->_dotsPosition = dotsPosition; 43 52 this->setupTextWidth(); 44 53 } … … 114 123 float maxWidth = this->_lineWidth / this->size(); 115 124 125 this->_dotedText = this->text(); 126 116 127 switch (this->_dotsPosition) 117 128 { … … 129 140 width += this->font()->getGlyphArray()[this->text()[i]]->advance; 130 141 } 131 this->setSizeX2D(width);132 142 break; 133 143 case Begin: … … 144 154 width += this->font()->getGlyphArray()[this->text()[i]]->advance; 145 155 } 146 this->setSizeX2D(width);147 156 break; 148 157 } 158 159 this->setSizeX2D(width * this->size()); 149 160 } 150 161 -
branches/gui/src/lib/graphics/text_engine/limited_width_text.h
r8538 r8542 33 33 /** @returns the dots position. */ 34 34 inline float dotsPosition() const { return this->_dotsPosition; }; 35 35 36 virtual void draw() const; 36 37
Note: See TracChangeset
for help on using the changeset viewer.