Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/story_entities/simple_game_menu.h @ 6521

Last change on this file since 6521 was 6521, checked in by patrick, 18 years ago

network: the background of the menu is now rotating (or the other way around :D )

File size: 2.1 KB
RevLine 
[6501]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
[6502]10#include "game_world.h"
[6504]11#include "event_listener.h"
[6502]12#include "game_world_data.h"
[6520]13#include <vector>
[6521]14#include "vector.h"
[6501]15
16
17class SimpleGameMenuData;
[6502]18class TiXmlElement;
[6520]19class ImageEntity;
[6501]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 */
[6504]26class SimpleGameMenu : virtual public GameWorld, virtual public EventListener
[6501]27{
28
29  public:
[6502]30    SimpleGameMenu(const TiXmlElement* root = NULL);
[6501]31    virtual ~SimpleGameMenu();
32
[6502]33    void loadParams(const TiXmlElement* root);
[6501]34
[6504]35    virtual ErrorMessage init();
[6521]36    virtual ErrorMessage loadData();
37
[6504]38    virtual bool start();
39    virtual bool stop();
40
41    virtual void process(const Event &event);
42
43
44  protected:
[6521]45    virtual void tick();
[6502]46    virtual void collide();
[6520]47
48
49  private:
[6521]50    void animateScene(float dt);
51
52
53  private:
[6520]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;
[6521]61
62    Vector                            cameraVector;
[6502]63};
[6501]64
65
66
[6502]67//! the simple game menu data
68class SimpleGameMenuData : public GameWorldData
69{
[6501]70
[6502]71  public:
72    SimpleGameMenuData();
73    virtual ~SimpleGameMenuData();
[6501]74
[6502]75    virtual ErrorMessage init();
[6501]76
[6502]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
[6501]87};
88
89
90#endif /* _GAME_WORLD_H */
Note: See TracBrowser for help on using the repository browser.