Changeset 7936 in orxonox.OLD
- Timestamp:
- May 28, 2006, 10:16:49 PM (18 years ago)
- 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
r7929 r7936 63 63 this->setSize2D(this->label.getSizeX2D() + 30, this->label.getSizeY2D() + 10); 64 64 GLGuiWidget::resize(); 65 this->frontRect().setTopLeft( 1, 1);66 this->frontRect().setSize(this->getSizeX2D() -2 , this->getSizeY2D() -2);65 this->frontRect().setTopLeft(borderSize(), borderSize()); 66 this->frontRect().setSize(this->getSizeX2D() -2.0*borderSize(), this->getSizeY2D() -2.0*borderSize()); 67 67 } 68 68 -
branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc
r7928 r7936 130 130 this->setSize2D( this->text.getSize2D() + Vector2D(8, 8)); 131 131 GLGuiWidget::resize(); 132 this->frontRect().setTopLeft( 1,1);133 this->frontRect().setSize(this->getSize2D() - Vector2D( 2,2));132 this->frontRect().setTopLeft(borderSize(), borderSize()); 133 this->frontRect().setSize(this->getSize2D() - Vector2D(borderSize(), borderSize())); 134 134 } 135 135 -
branches/gui/src/lib/gui/gl_gui/glgui_slider.cc
r7931 r7936 112 112 { 113 113 GLGuiWidget::resize(); 114 this->frontRect().setTopLeft(5, this->getSizeY2D()/2.0 - 1.0);115 this->frontRect().setSize(this->getSizeX2D() - 10.0, 5);114 this->frontRect().setTopLeft(5, this->getSizeY2D()/2.0 - borderSize()); 115 this->frontRect().setSize(this->getSizeX2D() - 10.0, borderSize()); 116 116 } 117 117 … … 176 176 this->drawRect(this->frontRect()); 177 177 178 this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 2, _sliderWidth, this->getSizeY2D() - 4));178 this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, borderSize(), _sliderWidth, this->getSizeY2D() - 2 * borderSize())); 179 179 180 180 this->endDraw(); -
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r7929 r7936 68 68 this->_backMat.setDiffuse(1.0, 1.0, 1.0); 69 69 this->_frontMat.setDiffuse(1.0, 0.0, 0.0); 70 this->_borderSize = 1.0; 70 71 71 72 this->widgetSignals.resize(SignalCount, SignalConnector()); … … 105 106 106 107 108 void GLGuiWidget::setBorderSize(float borderSize) 109 { 110 this->_borderSize = borderSize; 111 this->resize(); 112 } 113 114 107 115 void GLGuiWidget::resize() 108 116 { -
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7929 r7936 100 100 const Rect2D& frontRect() const { return this->_frontRect; }; 101 101 102 float borderSize() const { return this->_borderSize; }; 103 void setBorderSize(float borderSize); 104 102 105 inline void drawRect(const Rect2D& rect) const { 103 106 glBegin(GL_QUADS); … … 150 153 Rect2D _frontRect; 151 154 155 float _borderSize; 152 156 153 157 /// SIGNALS
Note: See TracChangeset
for help on using the changeset viewer.