Changeset 8542 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jun 16, 2006, 5:22:18 PM (18 years ago)
- Location:
- branches/gui/src/lib
- Files:
-
- 4 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 -
branches/gui/src/lib/gui/gl/glgui_inputline.cc
r8539 r8542 52 52 this->_text.setRelCoor2D(4,4); 53 53 this->_text.setFont("fonts/final_frontier.ttf", 20); 54 this->_text.setLineWidth(400); 55 this->_text.setDotsPosition(LimitedWidthText::End); 54 56 this->_text.setColor(this->frontColor()); 55 57 this->_text.setVisibility(false); -
branches/gui/src/lib/gui/gl/glgui_inputline.h
r8539 r8542 9 9 10 10 #include "glgui_widget.h" 11 #include " text.h"11 #include "limited_width_text.h" 12 12 #include "event.h" 13 13 … … 66 66 67 67 private: 68 Text_text; //!< The Text to display inside of the InputLine.68 LimitedWidthText _text; //!< The Text to display inside of the InputLine. 69 69 bool _clearOnEnter; //!< Clear on Enter 70 70
Note: See TracChangeset
for help on using the changeset viewer.