Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9108 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 11:10:19 AM (18 years ago)
Author:
rennerc
Message:

better network menu layout

Location:
branches/presentation/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/gui/gl/glgui_box.cc

    r8717 r9108  
    5959  void GLGuiBox::unpack(GLGuiWidget* widget)
    6060  {
    61     assert(widget == NULL);
     61    assert(widget != NULL);
    6262
    6363    std::vector<GLGuiWidget*>::iterator delWidget = std::find(this->children.begin(), this->children.end(), widget);
  • branches/presentation/src/story_entities/menu/game_menu.cc

    r9059 r9108  
    236236  if (this->networkBox == NULL)
    237237  {
    238     this->networkBox = new OrxGui::GLGuiBox();
     238    this->networkBox = new OrxGui::GLGuiBox( OrxGui::Horizontal );
    239239    {
     240      OrxGui::GLGuiBox * box = new OrxGui::GLGuiBox();
     241     
    240242      OrxGui::GLGuiButton* clientButton = new OrxGui::GLGuiPushButton("Client");
    241       networkBox->pack(clientButton);
     243      box->pack(clientButton);
    242244      clientButton->connect(SIGNAL(clientButton, released), this, SLOT(GameMenu, showClientMenu));
    243245
    244246      OrxGui::GLGuiButton* serverButton = new OrxGui::GLGuiPushButton("Server");
    245       networkBox->pack(serverButton);
     247      box->pack(serverButton);
    246248      serverButton->connect(SIGNAL(serverButton, released), this, SLOT(GameMenu, showServerMenu));
    247 
    248 
     249     
     250      networkBox->pack( box );
    249251    }
    250252  }
     
    511513  if ( this->serverNetworkBox )
    512514  {
    513     delete this->serverNetworkBox;
    514     this->serverNetworkBox = NULL;
     515    this->networkBox->unpack( this->serverNetworkBox );
     516    this->serverNetworkBox->hideAll();
     517    //delete this->serverNetworkBox;
     518    //this->serverNetworkBox = NULL;
    515519  }
    516520 
     
    535539  }
    536540 
     541  this->networkBox->pack( this->clientNetworkBox );
     542 
    537543  this->clientNetworkBox->showAll();
    538544 
    539   this->clientNetworkBox->setAbsCoor2D( 300.0f, 100.0f );
     545  //this->clientNetworkBox->setAbsCoor2D( 300.0f, 100.0f );
    540546}
    541547
     
    547553  if ( this->clientNetworkBox )
    548554  {
    549     delete this->clientNetworkBox;
    550     this->clientNetworkBox = NULL;
     555    this->networkBox->unpack( this->clientNetworkBox );
     556    this->clientNetworkBox->hideAll();
     557    //delete this->clientNetworkBox;
     558    //this->clientNetworkBox = NULL;
    551559  }
    552560 
     
    569577  }
    570578 
     579  this->networkBox->pack( this->serverNetworkBox );
     580 
    571581  this->serverNetworkBox->showAll();
    572582 
    573   this->serverNetworkBox->setAbsCoor2D( 300.0f, 100.0f );
     583  //this->serverNetworkBox->setAbsCoor2D( 300.0f, 100.0f );
    574584}
    575585
Note: See TracChangeset for help on using the changeset viewer.