Changeset 8619 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_inputline.cc
- Timestamp:
- Jun 20, 2006, 1:24:11 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/glgui_inputline.cc
r8518 r8619 52 52 this->_text.setRelCoor2D(4,4); 53 53 this->_text.setFont("fonts/final_frontier.ttf", 20); 54 this->_text.setColor(this->frontColor()); 54 this->_text.setLineWidth(400); 55 this->_text.setDotsPosition(LimitedWidthText::Begin); 56 this->_text.setColor(foregroundColor()); 55 57 this->_text.setVisibility(false); 56 58 this->resize(); 59 60 this->delayNext = 0.0; 61 this->pressedKey = SDLK_FIRST; 62 this->pressedKeyName = SDLK_FIRST; 57 63 58 64 } … … 116 122 this->resize(); 117 123 this->setFrontColor(Color(1,1,1,1), true); 118 this->setFrontColor(Color(0,1,0,1)); 119 emit(this->textChanged(this->_text.getText())); 124 emit(this->textChanged(this->_text.text())); 120 125 } 121 126 … … 139 144 void GLGuiInputLine::pushEnter() 140 145 { 141 emit(this->enterPushed(this->_text. getText()));146 emit(this->enterPushed(this->_text.text())); 142 147 if (this->_clearOnEnter) 143 148 this->clear(); … … 197 202 void GLGuiInputLine::resize() 198 203 { 199 this->_text.setRelCoor2D( this->borderLeft(), this->borderTop());204 this->_text.setRelCoor2D(borderLeft(), borderTop()); 200 205 this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom())); 201 206 GLGuiWidget::resize(); 202 /* this->frontRect().setTopLeft(borderLeft(), borderTop());203 this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/207 /* this->frontRect().setTopLeft(borderLeft(), borderTop()); 208 this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/ 204 209 } 205 210 206 211 void GLGuiInputLine::updateFrontColor() 207 212 { 208 this->_text.setColor( this->frontColor());213 this->_text.setColor(foregroundColor()); 209 214 } 210 215 … … 228 233 if (this->delayNext > 0.0) 229 234 this->delayNext -= dt; 230 235 else if (this->pressedKey != SDLK_FIRST ) 231 236 { 232 237 this->delayNext = GLGuiInputLine::repeatRate; … … 237 242 break; 238 243 default: 239 {240 if (likely(this->pressedKey < 127))241 this->appendCharacter(this->pressedKeyName);242 }244 { 245 if (likely(this->pressedKey < 127)) 246 this->appendCharacter(this->pressedKeyName); 247 } 243 248 } 244 249 } … … 255 260 GLGuiWidget::draw(); 256 261 257 // this->frontMaterial().select();258 // GLGuiWidget::drawRect(this->frontRect());262 // this->frontMaterial().select(); 263 // GLGuiWidget::drawRect(this->frontRect()); 259 264 260 265 this->endDraw();
Note: See TracChangeset
for help on using the changeset viewer.