1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 19:10:24 +00:00
OpenMW/apps/openmw/mwgui/mainmenu.hpp
scrawl 3820416277 Refactor the unholy mess that is WindowManager::updateVisible
GUI modes are now defined in a general and extensible way. The next commits are going to take advantage of this.
2017-09-24 19:08:12 +02:00

68 lines
1.3 KiB
C++

#ifndef OPENMW_GAME_MWGUI_MAINMENU_H
#define OPENMW_GAME_MWGUI_MAINMENU_H
#include "windowbase.hpp"
namespace Gui
{
class ImageButton;
}
namespace VFS
{
class Manager;
}
namespace MWGui
{
class BackgroundImage;
class SaveGameDialog;
class VideoWidget;
class MainMenu : public WindowBase
{
int mWidth;
int mHeight;
bool mHasAnimatedMenu;
public:
MainMenu(int w, int h, const VFS::Manager* vfs, const std::string& versionDescription);
~MainMenu();
void onResChange(int w, int h);
virtual void setVisible (bool visible);
void update(float dt);
private:
const VFS::Manager* mVFS;
MyGUI::Widget* mButtonBox;
MyGUI::TextBox* mVersionText;
BackgroundImage* mBackground;
MyGUI::ImageBox* mVideoBackground;
VideoWidget* mVideo; // For animated main menus
std::map<std::string, Gui::ImageButton*> mButtons;
void onButtonClicked (MyGUI::Widget* sender);
void onNewGameConfirmed();
void onExitConfirmed();
void showBackground(bool show);
void updateMenu();
SaveGameDialog* mSaveGameDialog;
};
}
#endif