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