- Timestamp:
- May 31, 2006, 12:35:02 AM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_box.cc
r8003 r8004 103 103 void GLGuiBox::resize() 104 104 { 105 float height = 0.0f;105 float height = this->borderSize(); 106 106 float width = 0.0f; 107 107 std::vector<GLGuiWidget*>::iterator widget; … … 110 110 for (widget = this->children.begin(); widget != this->children.end(); ++widget) 111 111 { 112 (*widget)->set AbsCoor2D(0, height);112 (*widget)->setRelCoor2D(this->borderSize(), height); 113 113 height += (*widget)->getSizeY2D(); 114 114 width = fmax(width, (*widget)->getSizeX2D()); 115 115 } 116 116 117 width += this->borderSize() * 2.0; 118 height += this->borderSize(); /* *2 done further up */ 119 120 printf("%f %f\n", width, height); 121 this->setSize2D(width, height); 117 122 GLGuiWidget::resize(); 118 123 // resize everything. -
branches/gui/src/story_entities/simple_game_menu.cc
r8003 r8004 90 90 /// 91 91 OrxGui::GLGuiButton* dnpb = new OrxGui::GLGuiCheckButton("Push the button"); 92 dnpb->show();93 dnpb->setAbsCoor2D(350, 50);94 92 95 93 box->pack(dnpb); 96 94 97 95 OrxGui::GLGuiPushButton* rdnpb = new OrxGui::GLGuiPushButton("Quit ORXONOX!!"); 98 rdnpb->show();99 rdnpb->setAbsCoor2D(200, 180);100 96 rdnpb->connect(SIGNAL(rdnpb, released), this, SLOT(SimpleGameMenu, quitMenu)); 101 97 … … 105 101 input->setText("input some text here"); 106 102 input->connect(SIGNAL(input, textChanged), this, SLOT(SimpleGameMenu, TEST)); 107 input->show();108 input->setAbsCoor2D(200, 230);109 103 box->pack(input); 110 104 111 105 OrxGui::GLGuiSlider* slider = new OrxGui::GLGuiSlider(); 112 106 slider->connect(SIGNAL(slider, valueChanged), this, SLOT(SimpleGameMenu, TEST)); 113 slider->connect(SIGNAL(slider, valueChanged), dnpb, SLOT(OrxGui::GLGuiWidget, setBackgroundColor));107 slider->connect(SIGNAL(slider, valueChanged), box, SLOT(OrxGui::GLGuiWidget, setBackgroundColor)); 114 108 slider->setRange(0, 1); 115 109 slider->setValue(slider->min()); 116 slider->show();117 slider->setAbsCoor2D(200, 270);118 110 box->pack(slider); 119 111 } 120 112 box->setAbsCoor2D(50, 200); 113 box->showAll(); 121 114 ///// 122 115 }
Note: See TracChangeset
for help on using the changeset viewer.