- Timestamp:
- Jun 2, 2006, 11:20:38 AM (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
r8115 r8116 65 65 void GLGuiCheckButton::resize() 66 66 { 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()); 69 69 GLGuiWidget::resize(); 70 70 this->frontRect().setTopLeft(borderLeft(), borderTop()); -
branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc
r8115 r8116 51 51 this->text.setRelCoor2D(4,4); 52 52 this->text.setFont("fonts/final_frontier.ttf", 20); 53 this->resize(); 53 this->text.setVisibility(false); 54 this->resize(); 55 54 56 } 55 57 … … 162 164 void GLGuiInputLine::resize() 163 165 { 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)); 165 168 GLGuiWidget::resize(); 166 169 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); 168 182 } 169 183 -
branches/gui/src/lib/gui/gl_gui/glgui_inputline.h
r8035 r8116 51 51 void init(); 52 52 void resize(); 53 virtual void hiding(); 54 virtual void showing(); 53 55 54 56 private: -
branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc
r8115 r8116 45 45 void GLGuiPushButton::resize() 46 46 { 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() ); 49 49 50 50 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())); 53 53 } 54 54 -
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r8115 r8116 69 69 this->_frontMat.setDiffuse(1.0, 0.0, 0.0); 70 70 71 this->_borderLeft = 1 .0;71 this->_borderLeft = 10.0; 72 72 this->_borderRight = 1.0; 73 73 this->_borderTop = 1.0;
Note: See TracChangeset
for help on using the changeset viewer.