OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mainmenu.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_GAME_MWGUI_MAINMENU_H
2 #define OPENMW_GAME_MWGUI_MAINMENU_H
3 
4 #include "layout.hpp"
5 
6 namespace Gui
7 {
8  class ImageButton;
9 }
10 
11 namespace VFS
12 {
13  class Manager;
14 }
15 
16 namespace MWGui
17 {
18 
19  class BackgroundImage;
20  class SaveGameDialog;
21  class VideoWidget;
22 
23  class MainMenu : public Layout
24  {
25  int mWidth;
26  int mHeight;
27 
29 
30  public:
31 
32  MainMenu(int w, int h, const VFS::Manager* vfs, const std::string& versionDescription);
33  ~MainMenu();
34 
35  void onResChange(int w, int h);
36 
37  virtual void setVisible (bool visible);
38 
39  void update(float dt);
40 
41  private:
43 
44  MyGUI::Widget* mButtonBox;
45  MyGUI::TextBox* mVersionText;
46 
48 
49  MyGUI::ImageBox* mVideoBackground;
50  VideoWidget* mVideo; // For animated main menus
51 
52  std::map<std::string, Gui::ImageButton*> mButtons;
53 
54  void onButtonClicked (MyGUI::Widget* sender);
55  void onNewGameConfirmed();
56  void onExitConfirmed();
57 
58  void showBackground(bool show);
59 
60  void updateMenu();
61 
63  };
64 
65 }
66 
67 #endif
void updateMenu()
Definition: mainmenu.cpp:196
void onNewGameConfirmed()
Definition: mainmenu.cpp:67
Definition: videowidget.hpp:22
Definition: mainmenu.hpp:23
bool mHasAnimatedMenu
Definition: mainmenu.hpp:28
const VFS::Manager * mVFS
Definition: mainmenu.hpp:42
VideoWidget * mVideo
Definition: mainmenu.hpp:50
void showBackground(bool show)
Definition: mainmenu.cpp:128
int mWidth
Definition: mainmenu.hpp:25
void onResChange(int w, int h)
Definition: mainmenu.cpp:47
void onButtonClicked(MyGUI::Widget *sender)
Definition: mainmenu.cpp:77
SaveGameDialog * mSaveGameDialog
Definition: mainmenu.hpp:62
MyGUI::TextBox * mVersionText
Definition: mainmenu.hpp:45
BackgroundImage * mBackground
Definition: mainmenu.hpp:47
std::map< std::string, Gui::ImageButton * > mButtons
Definition: mainmenu.hpp:52
void onExitConfirmed()
Definition: mainmenu.cpp:72
MyGUI::ImageBox * mVideoBackground
Definition: mainmenu.hpp:49
Definition: layout.hpp:13
Definition: savegamedialog.hpp:15
virtual void setVisible(bool visible)
Definition: mainmenu.cpp:55
~MainMenu()
Definition: mainmenu.cpp:42
MyGUI::Widget * mButtonBox
Definition: mainmenu.hpp:44
MainMenu(int w, int h, const VFS::Manager *vfs, const std::string &versionDescription)
Definition: mainmenu.cpp:25
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
int mHeight
Definition: mainmenu.hpp:26
A variant of MyGUI::ImageBox with aspect ratio correction using black bars.
Definition: backgroundimage.hpp:12
void update(float dt)
Definition: mainmenu.cpp:184