Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/story_entities/simple_game_menu.h @ 6726

Last change on this file since 6726 was 6696, checked in by patrick, 19 years ago

trunk: works again

File size: 2.1 KB
Line 
1/*!
2 * @file simple_game_menu.h
3 *  a StoryEntity that contains a simple game menu
4 */
5
6#ifndef _SIMPLE_GAME_MENU_H
7#define _SIMPLE_GAME_MENU_H
8
9
10#include "game_world.h"
11#include "event_listener.h"
12#include "game_world_data.h"
13#include <vector>
14#include "vector.h"
15
16
17class SimpleGameMenuData;
18class TiXmlElement;
19class ImageEntity;
20
21//! a simple game menu based on a story entity
22/**
23 * This is a simple menu, that is based on the StoryEntity. Therefore this menu is absolutly
24 * loadable and is exchangeable very easely :D
25 */
26class SimpleGameMenu : virtual public GameWorld, virtual public EventListener
27{
28
29  public:
30    SimpleGameMenu(const TiXmlElement* root = NULL);
31    virtual ~SimpleGameMenu();
32
33    virtual void loadParams(const TiXmlElement* root);
34
35    virtual ErrorMessage init();
36    virtual ErrorMessage loadData();
37
38    virtual bool start();
39    virtual bool stop();
40
41    virtual void process(const Event &event);
42
43
44  protected:
45    virtual void tick();
46    virtual void collide();
47
48
49  private:
50    void animateScene(float dt);
51
52
53  private:
54    std::vector<ImageEntity*>         menuList;                        //!< the list of the menu items
55    ImageEntity*                      menuSelected;                    //!< ref to the selected menu entity
56    ImageEntity*                      menuSelector;                    //!< ref to the selector image
57    ImageEntity*                      menuStartGame;
58    ImageEntity*                      menuStartMultiplayerGame;
59    ImageEntity*                      menuQuitGame;
60    int                               menuSelectedIndex;
61
62    Vector                            cameraVector;
63};
64
65
66
67//! the simple game menu data
68class SimpleGameMenuData : public GameWorldData
69{
70
71  public:
72    SimpleGameMenuData();
73    virtual ~SimpleGameMenuData();
74
75    virtual ErrorMessage init();
76
77
78  protected:
79    virtual ErrorMessage loadGUI(TiXmlElement* root);
80    virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
81    virtual ErrorMessage loadScene(TiXmlElement* root);
82
83    virtual ErrorMessage unloadGUI();
84    virtual ErrorMessage unloadWorldEntities();
85    virtual ErrorMessage unloadScene();
86
87};
88
89
90#endif /* _GAME_WORLD_H */
Note: See TracBrowser for help on using the repository browser.