Index: branches/gui/src/story_entities/game_menu.cc
===================================================================
--- branches/gui/src/story_entities/game_menu.cc	(revision 8674)
+++ branches/gui/src/story_entities/game_menu.cc	(revision 8677)
@@ -68,9 +68,4 @@
 
   State::setMenuID(this->getNextStoryID());
-}
-
-/// HACK only for testing.
-void GameMenu::enterGui()
-{
 }
 
@@ -126,4 +121,5 @@
   GraphicsEngine::getInstance()->displayFPS(false);
 
+  return ErrorMessage();
 }
 
@@ -134,20 +130,130 @@
 ErrorMessage GameMenu::loadData()
 {
-  this->mainMenuBox = new OrxGui::GLGuiBox();
+  this->mainMenuBox = NULL;
+
+  this->levelsBox = NULL;
+  this->networkBox = NULL;
+
+  this->optionsBox = NULL;
+  this->audioBox = NULL;
+  this->videoBox = NULL;
+  this->controlBox = NULL;
+  this->levelsBox = NULL;
+
+  return GameWorld::loadData();
+}
+
+
+void GameMenu::showMainMenu()
+{
+  if (mainMenuBox == NULL)
   {
-    OrxGui::GLGuiButton* startButton = new OrxGui::GLGuiPushButton("Play");
-    this->mainMenuBox->pack(startButton);
-
-
-    OrxGui::GLGuiButton* quitButton = new OrxGui::GLGuiPushButton("Quit");
-    this->mainMenuBox->pack(quitButton);
-    quitButton->connect(SIGNAL(quitButton, released), this, SLOT(GameMenu, quitMenu));
-
-
+    this->mainMenuBox = new OrxGui::GLGuiBox();
+    {
+      OrxGui::GLGuiButton* startButton = new OrxGui::GLGuiPushButton("Play");
+      startButton->connect(SIGNAL(startButton, released), this, SLOT(GameMenu, showCampaigns));
+      this->mainMenuBox->pack(startButton);
+
+      OrxGui::GLGuiButton* networkButton = new OrxGui::GLGuiPushButton("MultiPlayer");
+      networkButton->connect(SIGNAL(networkButton, released), this, SLOT(GameMenu, showMultiPlayer));
+      this->mainMenuBox->pack(networkButton);
+
+      OrxGui::GLGuiButton* optionsButton = new OrxGui::GLGuiPushButton("Options");
+      optionsButton->connect(SIGNAL(optionsButton, released), this, SLOT(GameMenu, showOptionsMenu));
+      this->mainMenuBox->pack(optionsButton);
+
+
+      OrxGui::GLGuiButton* quitButton = new OrxGui::GLGuiPushButton("Quit");
+      this->mainMenuBox->pack(quitButton);
+      quitButton->connect(SIGNAL(quitButton, released), this, SLOT(GameMenu, quitMenu));
+    }
   }
-
-
-  GameWorld::loadData();
-}
+  this->mainMenuBox->showAll();
+
+  this->mainMenuBox->setRelCoor2D(200, 100);
+}
+
+void GameMenu::showCampaigns()
+{
+
+  if (this->levelsBox == NULL)
+  {
+    this->levelsBox = new OrxGui::GLGuiBox();
+    {
+      const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY);
+      std::list<BaseObject*>::const_iterator it;
+      for( it = storyEntities->begin(); it != storyEntities->end(); it++)
+      {
+        StoryEntity* se = dynamic_cast<StoryEntity*>(*it);
+        if( se->isContainedInMenu())
+        {
+          OrxGui::GLGuiWidget* button = new OrxGui::GLGuiPushButton(se->getName());
+          levelsBox->pack(button);
+
+          // generating screenshoot item
+          /*
+          ImageEntity* ie = new ImageEntity();
+          ie->setVisibility(false);
+          ie->setBindNode((const PNode*)NULL);
+          ie->setTexture(se->getMenuScreenshoot());
+          ie->setRelCoor2D(State::getResX() / 2.0f + 250.0f, State::getResY() / 2.0f);
+          ie->setSize2D(140.0f, 105.0f);
+          this->menuLayers[1].screenshootList.push_back(ie);
+          */
+        }
+      }
+    }
+  }
+
+  this->levelsBox->showAll();
+  this->levelsBox->setRelCoor2D(200, 100);
+  this->mainMenuBox->setRelCoorSoft2D(50, 100, 5);
+
+}
+
+void GameMenu::showMultiPlayer()
+{
+
+}
+
+void GameMenu::showOptionsMenu()
+{
+  if (this->optionsBox == NULL)
+  {
+    this->optionsBox = new OrxGui::GLGuiBox();
+    {
+      OrxGui::GLGuiButton* generalButton = new OrxGui::GLGuiPushButton("General");
+      optionsBox->pack(generalButton);
+
+      OrxGui::GLGuiButton* audioButton = new OrxGui::GLGuiPushButton("Audio");
+      optionsBox->pack(audioButton);
+
+      OrxGui::GLGuiButton* videoButton = new OrxGui::GLGuiPushButton("Video");
+      optionsBox->pack(videoButton);
+
+      OrxGui::GLGuiButton* controlButton = new OrxGui::GLGuiPushButton("Control");
+      optionsBox->pack(controlButton);
+
+
+      //      for (unsigned int i = 0; i <
+      //OrxGui::GLGuiButton*
+
+    }
+  }
+  this->optionsBox->showAll();
+  this->optionsBox->setRelCoor2D(200, 100);
+
+  this->mainMenuBox->setRelCoorSoft2D(50, 100, 5);
+
+}
+
+
+
+
+
+
+
+
+
 
 /**
@@ -164,5 +270,5 @@
   this->unsubscribeEvents(ES_MENU);
 
-  GameWorld::unloadData();
+  return GameWorld::unloadData();
 }
 
@@ -175,8 +281,8 @@
   EventHandler::getInstance()->pushState(ES_MENU);
 
-  this->mainMenuBox->showAll();
+  this->showMainMenu();
 
   /* now call the underlying*/
-  GameWorld::start();
+  return GameWorld::start();
 }
 
@@ -191,5 +297,5 @@
 
   /* now call the underlying*/
-  GameWorld::stop();
+  return GameWorld::stop();
 }
 
@@ -276,5 +382,5 @@
 {
   /* call underlying function */
-  GameWorldData::init();
+  return GameWorldData::init();
 }
 
@@ -287,5 +393,5 @@
 {
   /* call underlying function */
-  GameWorldData::loadGUI(root);
+  return GameWorldData::loadGUI(root);
 }
 
@@ -297,5 +403,5 @@
 {
   /* call underlying function */
-  GameWorldData::unloadGUI();
+  return GameWorldData::unloadGUI();
 }
 
@@ -307,5 +413,5 @@
 ErrorMessage GameMenuData::loadWorldEntities(const TiXmlElement* root)
 {
-  GameWorldData::loadWorldEntities(root);
+  return GameWorldData::loadWorldEntities(root);
 }
 
@@ -317,5 +423,5 @@
 {
   /* call underlying function */
-  GameWorldData::unloadWorldEntities();
+  return GameWorldData::unloadWorldEntities();
 }
 
@@ -328,5 +434,5 @@
 {
   /* call underlying function */
-  GameWorldData::loadScene(root);
+  return GameWorldData::loadScene(root);
 }
 
@@ -338,7 +444,7 @@
 {
   /* call underlying function */
-  GameWorldData::unloadScene();
-}
-
-
-
+  return GameWorldData::unloadScene();
+}
+
+
+
