2014-03-16 23:38:51 +01:00
|
|
|
#ifndef OPENMW_GAME_MWGUI_MAINMENU_H
|
|
|
|
#define OPENMW_GAME_MWGUI_MAINMENU_H
|
|
|
|
|
2015-05-01 02:09:57 +02:00
|
|
|
#include "layout.hpp"
|
2012-05-13 18:14:03 +02:00
|
|
|
|
2014-09-12 05:14:21 +02:00
|
|
|
namespace Gui
|
|
|
|
{
|
|
|
|
class ImageButton;
|
|
|
|
}
|
|
|
|
|
2015-05-02 18:14:53 +02:00
|
|
|
namespace VFS
|
|
|
|
{
|
|
|
|
class Manager;
|
|
|
|
}
|
|
|
|
|
2012-05-13 18:14:03 +02:00
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
|
2014-03-30 23:04:12 +02:00
|
|
|
class BackgroundImage;
|
2013-11-21 20:24:58 +01:00
|
|
|
class SaveGameDialog;
|
2014-05-29 17:21:35 +02:00
|
|
|
class VideoWidget;
|
2013-11-21 20:24:58 +01:00
|
|
|
|
2015-05-01 02:09:57 +02:00
|
|
|
class MainMenu : public Layout
|
2012-05-13 18:14:03 +02:00
|
|
|
{
|
2013-11-18 15:52:25 +01:00
|
|
|
int mWidth;
|
|
|
|
int mHeight;
|
2012-08-10 15:15:48 +02:00
|
|
|
|
2014-05-29 17:21:35 +02:00
|
|
|
bool mHasAnimatedMenu;
|
|
|
|
|
2013-11-18 15:52:25 +01:00
|
|
|
public:
|
2012-08-11 17:26:01 +02:00
|
|
|
|
2015-07-18 03:01:06 +02:00
|
|
|
MainMenu(int w, int h, const VFS::Manager* vfs, const std::string& versionDescription);
|
2013-11-21 20:24:58 +01:00
|
|
|
~MainMenu();
|
2012-08-10 15:15:48 +02:00
|
|
|
|
2013-11-18 15:52:25 +01:00
|
|
|
void onResChange(int w, int h);
|
2013-01-03 01:09:03 +01:00
|
|
|
|
2013-11-18 15:52:25 +01:00
|
|
|
virtual void setVisible (bool visible);
|
|
|
|
|
2014-05-29 17:21:35 +02:00
|
|
|
void update(float dt);
|
|
|
|
|
2013-11-18 15:52:25 +01:00
|
|
|
private:
|
2015-05-02 18:14:53 +02:00
|
|
|
const VFS::Manager* mVFS;
|
2013-11-18 15:52:25 +01:00
|
|
|
|
|
|
|
MyGUI::Widget* mButtonBox;
|
2014-03-12 14:37:44 +01:00
|
|
|
MyGUI::TextBox* mVersionText;
|
2013-11-18 15:52:25 +01:00
|
|
|
|
2014-03-30 23:04:12 +02:00
|
|
|
BackgroundImage* mBackground;
|
2014-03-27 04:15:47 +01:00
|
|
|
|
2014-05-29 17:21:35 +02:00
|
|
|
MyGUI::ImageBox* mVideoBackground;
|
|
|
|
VideoWidget* mVideo; // For animated main menus
|
|
|
|
|
2014-09-12 05:14:21 +02:00
|
|
|
std::map<std::string, Gui::ImageButton*> mButtons;
|
2013-11-18 15:52:25 +01:00
|
|
|
|
|
|
|
void onButtonClicked (MyGUI::Widget* sender);
|
2014-03-26 21:11:39 +01:00
|
|
|
void onNewGameConfirmed();
|
2014-03-26 22:05:21 +01:00
|
|
|
void onExitConfirmed();
|
2013-11-18 15:52:25 +01:00
|
|
|
|
2014-03-27 04:15:47 +01:00
|
|
|
void showBackground(bool show);
|
|
|
|
|
2013-11-18 15:52:25 +01:00
|
|
|
void updateMenu();
|
2013-11-21 20:24:58 +01:00
|
|
|
|
|
|
|
SaveGameDialog* mSaveGameDialog;
|
2012-05-13 18:14:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2014-03-16 23:38:51 +01:00
|
|
|
|
|
|
|
#endif
|