2010-05-09 21:23:13 +00:00
|
|
|
// ==============================================================
|
|
|
|
// This file is part of Glest (www.glest.org)
|
|
|
|
//
|
2012-10-30 06:48:12 +00:00
|
|
|
// Copyright (C) 2001-2008 Martiño Figueroa
|
2010-05-09 21:23:13 +00:00
|
|
|
//
|
|
|
|
// You can redistribute this code and/or modify it under
|
|
|
|
// the terms of the GNU General Public License as published
|
|
|
|
// by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version
|
|
|
|
// ==============================================================
|
|
|
|
|
|
|
|
#ifndef _GLEST_GAME_MENUSTATEROOT_H_
|
|
|
|
#define _GLEST_GAME_MENUSTATEROOT_H_
|
|
|
|
|
|
|
|
#include "main_menu.h"
|
2010-09-07 05:25:40 +00:00
|
|
|
#include "leak_dumper.h"
|
2010-05-09 21:23:13 +00:00
|
|
|
|
|
|
|
namespace Glest{ namespace Game{
|
|
|
|
|
|
|
|
// ===============================
|
|
|
|
// class MenuStateRoot
|
|
|
|
// ===============================
|
|
|
|
|
2010-06-12 19:27:11 +00:00
|
|
|
class GraphicMessageBox;
|
2011-09-21 06:51:28 +00:00
|
|
|
class PopupMenu;
|
2010-06-12 19:27:11 +00:00
|
|
|
|
2011-04-15 01:05:36 +00:00
|
|
|
class MenuStateRoot: public MenuState {
|
2010-05-09 21:23:13 +00:00
|
|
|
private:
|
|
|
|
GraphicButton buttonNewGame;
|
2012-03-14 23:53:11 +00:00
|
|
|
GraphicButton buttonLoadGame;
|
2011-03-25 10:11:16 +00:00
|
|
|
GraphicButton buttonMods;
|
2010-05-09 21:23:13 +00:00
|
|
|
GraphicButton buttonOptions;
|
|
|
|
GraphicButton buttonAbout;
|
|
|
|
GraphicButton buttonExit;
|
|
|
|
GraphicLabel labelVersion;
|
|
|
|
|
2010-06-12 19:27:11 +00:00
|
|
|
GraphicMessageBox mainMessageBox;
|
2011-12-05 00:02:32 +00:00
|
|
|
GraphicMessageBox errorMessageBox;
|
2010-06-12 19:27:11 +00:00
|
|
|
|
2011-09-21 06:51:28 +00:00
|
|
|
PopupMenu popupMenu;
|
|
|
|
|
2010-05-09 21:23:13 +00:00
|
|
|
public:
|
|
|
|
MenuStateRoot(Program *program, MainMenu *mainMenu);
|
|
|
|
|
|
|
|
void mouseClick(int x, int y, MouseButton mouseButton);
|
|
|
|
void mouseMove(int x, int y, const MouseState *mouseState);
|
|
|
|
void render();
|
|
|
|
void update();
|
2011-06-26 01:55:08 +00:00
|
|
|
virtual void keyDown(SDL_KeyboardEvent key);
|
2010-06-12 19:27:11 +00:00
|
|
|
void showMessageBox(const string &text, const string &header, bool toggle);
|
2011-09-27 05:29:57 +00:00
|
|
|
|
2011-12-05 00:02:32 +00:00
|
|
|
void showErrorMessageBox(const string &text, const string &header, bool toggle);
|
|
|
|
|
2011-09-27 05:29:57 +00:00
|
|
|
virtual bool isMasterserverMode() const;
|
2011-10-25 18:39:11 +00:00
|
|
|
virtual void reloadUI();
|
2010-05-09 21:23:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}}//end namespace
|
|
|
|
|
|
|
|
#endif
|