Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8448 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_slider.cc


Ignore:
Timestamp:
Jun 15, 2006, 12:48:26 PM (18 years ago)
Author:
bensch
Message:

merged gui back to the trunk
merged with command
merge -r8377:HEAD https://svn.orxonox.net/orxonox/branches/gui .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_slider.cc

    r8335 r8448  
    7474    else
    7575      this->_value = value;
     76    this->_handle.setCenter(this->sliderPosition(), this->borderTop() + (this->getSizeY2D() - this->borderTop() - borderBottom()) / 2.0);
     77
    7678    emit(valueChanged(this->_value));
    7779  }
     
    161163  {
    162164    GLGuiWidget::resize();
    163     this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
    164     this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
     165//    this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
     166//    this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
     167    this->_slider.setTopLeft(this->borderLeft(), this->getSizeY2D() / 2.0 -2.0);
     168    this->_slider.setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
     169    this->_handle.setSize(this->_sliderWidth, this->getSizeY2D() - borderTop() - borderBottom());
     170  }
     171
     172  void GLGuiSlider::updateFrontColor()
     173  {
     174
    165175  }
    166176
     
    218228  void GLGuiSlider::tick(float dt)
    219229  {
     230    GLGuiWidget::tick(dt);
    220231  }
    221232
     
    228239    GLGuiWidget::draw();
    229240
    230     this->frontMaterial().select();
    231     this->drawRect(this->frontRect());
    232 
    233     this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) ));
     241    glColor4fv(&this->frontColor()[0]);
     242    this->drawRect(this->_slider);
     243    this->drawRect(this->_handle);
     244    //this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) ));
    234245
    235246    this->endDraw();
Note: See TracChangeset for help on using the changeset viewer.