Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8688 in orxonox.OLD for branches/gui/src/story_entities/game_menu.cc


Ignore:
Timestamp:
Jun 21, 2006, 10:33:24 PM (18 years ago)
Author:
bensch
Message:

added image-button a speciality of glgui to display buttons, that on push show a new Image inside a ImageWidget

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/story_entities/game_menu.cc

    r8677 r8688  
    2525
    2626#include "util/loading/load_param.h"
    27 #include "fast_factory.h"
    2827#include "util/loading/factory.h"
    29 #include "loading/resource_manager.h"
    30 
    31 #include "world_entity.h"
    32 #include "elements/image_entity.h"
    33 #include "terrain.h"
     28#include "util/loading/resource_manager.h"
     29
     30#include "graphics_engine.h"
    3431#include "camera.h"
    35 
    36 #include "graphics_engine.h"
    37 #include "object_manager.h"
    3832#include "sound_engine.h"
     33
    3934#include "sound_source.h"
    40 
    41 #include "cd_engine.h"
    4235
    4336#include "glgui.h"
     
    136129
    137130  this->optionsBox = NULL;
     131  this->generalBox = NULL;
    138132  this->audioBox = NULL;
    139133  this->videoBox = NULL;
    140134  this->controlBox = NULL;
    141135  this->levelsBox = NULL;
     136
     137  this->currentlyOpened = NULL;
    142138
    143139  return GameWorld::loadData();
     
    174170}
    175171
     172
    176173void GameMenu::showCampaigns()
    177174{
    178 
    179175  if (this->levelsBox == NULL)
    180176  {
     
    206202  }
    207203
    208   this->levelsBox->showAll();
    209   this->levelsBox->setRelCoor2D(200, 100);
    210   this->mainMenuBox->setRelCoorSoft2D(50, 100, 5);
     204  this->showSecondLevelElement(this->levelsBox);
    211205
    212206}
    213207
    214208void GameMenu::showMultiPlayer()
    215 {
    216 
    217 }
     209{}
    218210
    219211void GameMenu::showOptionsMenu()
     
    241233    }
    242234  }
    243   this->optionsBox->showAll();
    244   this->optionsBox->setRelCoor2D(200, 100);
     235
     236  this->showSecondLevelElement(this->optionsBox);
     237}
     238
     239
     240void GameMenu::showSecondLevelElement(OrxGui::GLGuiBox* element)
     241{
     242  if (this->currentlyOpened != NULL && this->currentlyOpened != element)
     243    this->currentlyOpened->hideAll();
     244
     245  element->showAll();
     246  element->setRelCoor2D(200, 100);
     247
     248  this->currentlyOpened = element;
    245249
    246250  this->mainMenuBox->setRelCoorSoft2D(50, 100, 5);
    247 
    248 }
    249 
    250 
    251 
     251}
    252252
    253253
Note: See TracChangeset for help on using the changeset viewer.