Changeset 8421 in orxonox.OLD for branches/gui/src/lib/gui/gl
- Timestamp:
- Jun 14, 2006, 11:32:14 PM (18 years ago)
- Location:
- branches/gui/src/lib/gui/gl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_inputline.cc
r8419 r8421 154 154 } 155 155 } 156 157 156 return false; 158 157 } -
branches/gui/src/lib/gui/gl/glgui_slider.cc
r8378 r8421 74 74 else 75 75 this->_value = value; 76 this->_handle.setCenter(this->sliderPosition(), this->borderTop() + (this->getSizeY2D() - this->borderTop() - borderBottom()) / 2.0); 77 76 78 emit(valueChanged(this->_value)); 77 79 } … … 161 163 { 162 164 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 165 175 } 166 176 … … 228 238 GLGuiWidget::draw(); 229 239 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()) ));240 glColor4fv(&this->frontColor()[0]); 241 this->drawRect(this->_slider); 242 this->drawRect(this->_handle); 243 //this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) )); 234 244 235 245 this->endDraw(); -
branches/gui/src/lib/gui/gl/glgui_slider.h
r8145 r8421 56 56 protected: 57 57 virtual void resize(); 58 virtual void updateFrontColor(); 58 59 59 60 virtual void clicking(const Vector2D& pos); … … 68 69 private: 69 70 Orientation orientation; 71 72 Rect2D _slider; 73 Rect2D _handle; 70 74 71 75 float _maxValue;
Note: See TracChangeset
for help on using the changeset viewer.