Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2006, 11:07:48 PM (18 years ago)
Author:
bensch
Message:

Better coloring sceme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_inputline.cc

    r8378 r8419  
    4848    this->setFocusable(true);
    4949
    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);
    5454    this->resize();
    5555
     
    6363  void GLGuiInputLine::setText(const std::string& text)
    6464  {
    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()));
    6969  }
    7070
     
    7575  void GLGuiInputLine::append(const std::string& appendText)
    7676  {
    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()));
    8080  }
    8181
     
    8787  void GLGuiInputLine::appendCharacter(char character)
    8888  {
    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()));
    9292  }
    9393
     
    9999  void GLGuiInputLine::removeCharacters(unsigned int chars)
    100100  {
    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()));
    104104  }
    105105
     
    164164  void GLGuiInputLine::resize()
    165165  {
    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));
    168168    GLGuiWidget::resize();
    169169/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
     
    171171  }
    172172
     173  void GLGuiInputLine::updateFrontColor()
     174  {
     175    this->_text.setColor(this->frontColor());
     176  }
    173177
    174178  void GLGuiInputLine::hiding()
    175179  {
    176     this->text.setVisibility(false);
     180    this->_text.setVisibility(false);
    177181  }
    178182
    179183  void GLGuiInputLine::showing()
    180184  {
    181     this->text.setVisibility(true);
     185    this->_text.setVisibility(true);
    182186  }
    183187
Note: See TracChangeset for help on using the changeset viewer.