Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8673 in orxonox.OLD for branches/gui/src/story_entities/game_menu.h


Ignore:
Timestamp:
Jun 21, 2006, 3:43:44 PM (19 years ago)
Author:
bensch
Message:

added game_menu.cc

File:
1 copied

Legend:

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

    r8667 r8673  
    11/*!
    2  * @file simple_game_menu.h
     2 * @file game_menu.h
    33 *  a StoryEntity that contains a simple game menu
    44 */
    55
    6 #ifndef _SIMPLE_GAME_MENU_H
    7 #define _SIMPLE_GAME_MENU_H
     6#ifndef _GAME_MENU_H
     7#define _GAME_MENU_H
    88
    99
    1010#include "game_world.h"
    11 #include "event_listener.h"
    1211#include "game_world_data.h"
    1312#include <vector>
    14 #include "vector.h"
    15 
    16 
    17 #include "elements/text_element.h"
    18 
    1913#include "glgui.h"
    2014
    21 class SimpleGameMenuData;
    22 class TiXmlElement;
    23 class ImageEntity;
    24 
    2515namespace OrxSound { class SoundSource; }
    26 
    27 class MenuLayer
    28 {
    29   public:
    30     MenuLayer() {}
    31     virtual ~MenuLayer() {}
    32 
    33 
    34   public:
    35     std::vector<TextElement*>         menuList;                        //!< the list of the menu items
    36     std::vector<StoryEntity*>         storyList;                       //!< the list of the StoryEntities for the menu
    37     std::vector<ImageEntity*>         screenshootList;                 //!< list of the screen shoots FIXME: make a better structure for this stuff
    38 };
    39 
    4016
    4117//! a simple game menu based on a story entity
     
    4420 * loadable and is exchangeable very easely :D
    4521 */
    46 class SimpleGameMenu : virtual public GameWorld, virtual public EventListener
     22class GameMenu : virtual public GameWorld, virtual public EventListener
    4723{
    4824
    4925  public:
    50     SimpleGameMenu(const TiXmlElement* root = NULL);
    51     virtual ~SimpleGameMenu();
     26    GameMenu(const TiXmlElement* root = NULL);
     27    virtual ~GameMenu();
    5228
    5329    /// TODO TAKE THIS OUT
     
    7551    void quitMenu();
    7652
    77     void TEST(int val) { printf("TEST %d\n", val); }
    78 
    7953  protected:
    8054    virtual void tick();
     
    9064
    9165  private:
    92     std::vector<MenuLayer>            menuLayers;                      //!< the menu layer
    93     MenuLayer*                        selectedLayer;                   //!< the selected menu layer
    94     int                               layerIndex;
    95 
    96     //std::vector<ImageEntity*>         menuList;                        //!< the list of the menu items
    97     ImageEntity*                      menuSelector;                    //!< ref to the selector image
    98     TextElement*                      menuSelected;                    //!< ref to the selected menu entity
    99     TextElement*                      menuStartGame;
    100     TextElement*                      menuStartMultiplayerGame;
    101     TextElement*                      menuQuitGame;
    102     int                               menuSelectedIndex;
     66    OrxGui::GLGuiBox*                 mainMenu;
     67    OrxGui::GLGuiBox*                 audioBox;
     68    OrxGui::GLGuiBox*                 videoBox;
     69    OrxGui::GLGuiBox*                 controlBox;
     70    OrxGui::GLGuiBox*                 levelsBox;
    10371
    10472    Vector                            cameraVector;
     
    11078
    11179//! the simple game menu data
    112 class SimpleGameMenuData : public GameWorldData
     80class GameMenuData : public GameWorldData
    11381{
    11482
    11583  public:
    116     SimpleGameMenuData();
    117     virtual ~SimpleGameMenuData();
     84    GameMenuData();
     85    virtual ~GameMenuData();
    11886
    11987    virtual ErrorMessage init();
Note: See TracChangeset for help on using the changeset viewer.