Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8116 in orxonox.OLD


Ignore:
Timestamp:
Jun 2, 2006, 11:20:38 AM (18 years ago)
Author:
bensch
Message:

gui: borders should work… testing

Location:
branches/gui/src/lib/gui/gl_gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc

    r8115 r8116  
    6565  void GLGuiCheckButton::resize()
    6666  {
    67     this->labelText().setRelCoor2D(25, 5);
    68     this->setSize2D(this->labelText().getSizeX2D() + 30, this->labelText().getSizeY2D() + 10);
     67    this->labelText().setRelCoor2D(borderLeft() + 25, borderTop() + 5);
     68    this->setSize2D(this->labelText().getSizeX2D() + 30 + borderLeft() + borderRight(), this->labelText().getSizeY2D() + 10 + borderTop()+borderBottom());
    6969    GLGuiWidget::resize();
    7070    this->frontRect().setTopLeft(borderLeft(), borderTop());
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc

    r8115 r8116  
    5151    this->text.setRelCoor2D(4,4);
    5252    this->text.setFont("fonts/final_frontier.ttf", 20);
    53     this->resize();
     53    this->text.setVisibility(false);
     54    this->resize();
     55
    5456  }
    5557
     
    162164  void GLGuiInputLine::resize()
    163165  {
    164     this->setSize2D( this->text.getSize2D() + Vector2D(8, 8));
     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));
    165168    GLGuiWidget::resize();
    166169    this->frontRect().setTopLeft(borderLeft(), borderTop());
    167     this->frontRect().setSize(this->getSize2D() - Vector2D(borderRight(), borderBottom()));
     170    this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));
     171  }
     172
     173
     174  void GLGuiInputLine::hiding()
     175  {
     176    this->text.setVisibility(false);
     177  }
     178
     179  void GLGuiInputLine::showing()
     180  {
     181    this->text.setVisibility(true);
    168182  }
    169183
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.h

    r8035 r8116  
    5151    void init();
    5252    void resize();
     53    virtual void hiding();
     54    virtual void showing();
    5355
    5456  private:
  • branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc

    r8115 r8116  
    4545  void GLGuiPushButton::resize()
    4646  {
    47     this->labelText().setRelCoor2D(5, 5);
    48     this->setSize2D(this->labelText().getSizeX2D() + 10, this->labelText().getSizeY2D() + 10);
     47    this->labelText().setRelCoor2D(borderLeft() + 5, borderTop() + 5);
     48    this->setSize2D(this->labelText().getSizeX2D() + 10 + borderLeft()+borderRight(), this->labelText().getSizeY2D() + 10 + borderTop() + borderBottom() );
    4949
    5050    GLGuiWidget::resize();
    51     this->frontRect().setTopLeft(1, 1);
    52     this->frontRect().setSize(this->getSizeX2D() -2, this->getSizeY2D() -2);
     51    this->frontRect().setTopLeft(borderLeft(), borderRight());
     52    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()));
    5353  }
    5454
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.cc

    r8115 r8116  
    6969    this->_frontMat.setDiffuse(1.0, 0.0, 0.0);
    7070
    71     this->_borderLeft = 1.0;
     71    this->_borderLeft = 10.0;
    7272    this->_borderRight = 1.0;
    7373    this->_borderTop = 1.0;
Note: See TracChangeset for help on using the changeset viewer.