Changeset 8419 in orxonox.OLD for branches/gui/src/lib/gui/gl/glgui_inputline.cc
- Timestamp:
- Jun 14, 2006, 11:07:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_inputline.cc
r8378 r8419 48 48 this->setFocusable(true); 49 49 50 this-> text.setParent2D(this);51 this-> text.setRelCoor2D(4,4);52 this-> text.setFont("fonts/final_frontier.ttf", 20);53 this-> text.setVisibility(false);50 this->_text.setParent2D(this); 51 this->_text.setRelCoor2D(4,4); 52 this->_text.setFont("fonts/final_frontier.ttf", 20); 53 this->_text.setVisibility(false); 54 54 this->resize(); 55 55 … … 63 63 void GLGuiInputLine::setText(const std::string& text) 64 64 { 65 this-> text.setText(text);66 this->resize(); 67 68 emit(this->textChanged(this-> getText()));65 this->_text.setText(text); 66 this->resize(); 67 68 emit(this->textChanged(this->_text.getText())); 69 69 } 70 70 … … 75 75 void GLGuiInputLine::append(const std::string& appendText) 76 76 { 77 this-> text.append(appendText);78 this->resize(); 79 emit(this->textChanged(this-> text.getText()));77 this->_text.append(appendText); 78 this->resize(); 79 emit(this->textChanged(this->_text.getText())); 80 80 } 81 81 … … 87 87 void GLGuiInputLine::appendCharacter(char character) 88 88 { 89 this-> text.appendCharacter(character);90 this->resize(); 91 emit(this->textChanged(this-> text.getText()));89 this->_text.appendCharacter(character); 90 this->resize(); 91 emit(this->textChanged(this->_text.getText())); 92 92 } 93 93 … … 99 99 void GLGuiInputLine::removeCharacters(unsigned int chars) 100 100 { 101 this-> text.removeCharacters(chars);102 this->resize(); 103 emit(this->textChanged(this-> text.getText()));101 this->_text.removeCharacters(chars); 102 this->resize(); 103 emit(this->textChanged(this->_text.getText())); 104 104 } 105 105 … … 164 164 void GLGuiInputLine::resize() 165 165 { 166 this-> text.setRelCoor2D(this->borderLeft() + 2.0,this->borderTop() + 2.0);167 this->setSize2D( this-> text.getSize2D() + Vector2D(borderLeft() + borderRight() + 4.0, borderTop() + borderBottom() + 4.0));166 this->_text.setRelCoor2D(this->borderLeft() + 2.0,this->borderTop() + 2.0); 167 this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight() + 4.0, borderTop() + borderBottom() + 4.0)); 168 168 GLGuiWidget::resize(); 169 169 /* this->frontRect().setTopLeft(borderLeft(), borderTop()); … … 171 171 } 172 172 173 void GLGuiInputLine::updateFrontColor() 174 { 175 this->_text.setColor(this->frontColor()); 176 } 173 177 174 178 void GLGuiInputLine::hiding() 175 179 { 176 this-> text.setVisibility(false);180 this->_text.setVisibility(false); 177 181 } 178 182 179 183 void GLGuiInputLine::showing() 180 184 { 181 this-> text.setVisibility(true);185 this->_text.setVisibility(true); 182 186 } 183 187
Note: See TracChangeset
for help on using the changeset viewer.