2010-03-23 02:38:19 +01:00
|
|
|
// ==============================================================
|
|
|
|
// This file is part of Glest (www.glest.org)
|
|
|
|
//
|
2012-10-30 07:48:12 +01:00
|
|
|
// Copyright (C) 2001-2008 Martiño Figueroa
|
2010-03-23 02:38:19 +01:00
|
|
|
//
|
2010-12-24 04:36:34 +01: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
|
2010-03-23 02:38:19 +01:00
|
|
|
// License, or (at your option) any later version
|
|
|
|
// ==============================================================
|
|
|
|
|
|
|
|
#ifndef _GLEST_GAME_MENUSTATEOPTIONS_H_
|
|
|
|
#define _GLEST_GAME_MENUSTATEOPTIONS_H_
|
|
|
|
|
|
|
|
#include "main_menu.h"
|
2010-09-07 07:25:40 +02:00
|
|
|
#include "leak_dumper.h"
|
2010-03-23 02:38:19 +01:00
|
|
|
|
|
|
|
namespace Glest{ namespace Game{
|
|
|
|
|
|
|
|
// ===============================
|
2010-12-24 04:36:34 +01:00
|
|
|
// class MenuStateOptions
|
2010-03-23 02:38:19 +01:00
|
|
|
// ===============================
|
|
|
|
|
|
|
|
class MenuStateOptions: public MenuState{
|
|
|
|
private:
|
2010-09-09 08:42:39 +02:00
|
|
|
|
2010-12-24 04:36:34 +01:00
|
|
|
GraphicButton buttonOk;
|
2013-04-21 19:04:36 +02:00
|
|
|
GraphicButton buttonReturn;
|
2010-12-24 04:36:34 +01:00
|
|
|
|
2010-03-23 02:38:19 +01:00
|
|
|
GraphicLabel labelLang;
|
|
|
|
GraphicListBox listBoxLang;
|
|
|
|
GraphicLabel labelPlayerName;
|
|
|
|
GraphicLabel labelPlayerNameLabel;
|
|
|
|
GraphicLabel *activeInputLabel;
|
2010-12-24 04:36:34 +01:00
|
|
|
|
|
|
|
|
2013-04-21 19:04:36 +02:00
|
|
|
GraphicButton buttonKeyboardSetup; // configure the keyboard
|
|
|
|
GraphicButton buttonVideoSection;
|
|
|
|
GraphicButton buttonAudioSection;
|
|
|
|
GraphicButton buttonMiscSection;
|
|
|
|
GraphicButton buttonNetworkSettings;
|
2010-12-24 04:36:34 +01:00
|
|
|
|
2010-04-08 00:20:28 +02:00
|
|
|
GraphicLabel labelFontSizeAdjustment;
|
|
|
|
GraphicListBox listFontSizeAdjustment;
|
2010-12-24 04:36:34 +01:00
|
|
|
|
|
|
|
|
2010-04-02 16:21:43 +02:00
|
|
|
GraphicMessageBox mainMessageBox;
|
|
|
|
int mainMessageBoxState;
|
2010-12-24 04:36:34 +01:00
|
|
|
|
2011-01-06 08:15:43 +01:00
|
|
|
|
2011-03-31 03:34:01 +02:00
|
|
|
|
2011-04-02 23:17:17 +02:00
|
|
|
GraphicLabel labelScreenShotType;
|
|
|
|
GraphicListBox listBoxScreenShotType;
|
|
|
|
|
2011-04-19 05:26:42 +02:00
|
|
|
GraphicLabel labelDisableScreenshotConsoleText;
|
|
|
|
GraphicCheckBox checkBoxDisableScreenshotConsoleText;
|
|
|
|
|
2011-08-31 22:10:43 +02:00
|
|
|
GraphicLabel labelMouseMoveScrollsWorld;
|
|
|
|
GraphicCheckBox checkBoxMouseMoveScrollsWorld;
|
|
|
|
|
2011-06-10 00:54:45 +02:00
|
|
|
GraphicLabel labelVisibleHud;
|
|
|
|
GraphicCheckBox checkBoxVisibleHud;
|
2012-10-12 00:10:31 +02:00
|
|
|
GraphicLabel labelTimeDisplay;
|
|
|
|
GraphicCheckBox checkBoxTimeDisplay;
|
|
|
|
GraphicLabel labelChatStaysActive;
|
|
|
|
GraphicCheckBox checkBoxChatStaysActive;
|
2011-06-10 00:54:45 +02:00
|
|
|
|
2012-10-16 23:08:45 +02:00
|
|
|
GraphicLabel labelLuaDisableSecuritySandbox;
|
|
|
|
GraphicCheckBox checkBoxLuaDisableSecuritySandbox;
|
|
|
|
|
|
|
|
GraphicMessageBox luaMessageBox;
|
|
|
|
int luaMessageBoxState;
|
|
|
|
|
2011-12-01 00:35:54 +01:00
|
|
|
map<string,string> languageList;
|
2011-04-02 23:17:17 +02:00
|
|
|
|
2012-10-22 07:08:52 +02:00
|
|
|
GraphicLabel labelCustomTranslation;
|
|
|
|
GraphicCheckBox checkBoxCustomTranslation;
|
|
|
|
|
|
|
|
GraphicButton buttonGetNewLanguageFiles;
|
|
|
|
GraphicButton buttonDeleteNewLanguageFiles;
|
|
|
|
GraphicLabel labelTransifexUserLabel;
|
|
|
|
GraphicLabel labelTransifexUser;
|
|
|
|
GraphicLabel labelTransifexPwdLabel;
|
|
|
|
GraphicLabel labelTransifexPwd;
|
|
|
|
GraphicLabel labelTransifexI18NLabel;
|
|
|
|
GraphicLabel labelTransifexI18N;
|
|
|
|
|
2013-04-21 19:04:36 +02:00
|
|
|
ProgramState **parentUI;
|
2013-01-24 01:29:20 +01:00
|
|
|
|
2010-03-23 02:38:19 +01:00
|
|
|
public:
|
2013-04-21 19:04:36 +02:00
|
|
|
MenuStateOptions(Program *program, MainMenu *mainMenu, ProgramState **parentUI=NULL);
|
2010-03-23 02:38:19 +01:00
|
|
|
|
|
|
|
void mouseClick(int x, int y, MouseButton mouseButton);
|
|
|
|
void mouseMove(int x, int y, const MouseState *mouseState);
|
|
|
|
void render();
|
2011-06-26 03:55:08 +02:00
|
|
|
virtual void keyDown(SDL_KeyboardEvent key);
|
|
|
|
virtual void keyPress(SDL_KeyboardEvent c);
|
2011-04-20 18:25:16 +02:00
|
|
|
virtual bool isInSpecialKeyCaptureEvent();
|
2010-03-23 02:38:19 +01:00
|
|
|
|
2011-10-25 20:39:11 +02:00
|
|
|
virtual void reloadUI();
|
|
|
|
|
|
|
|
|
2010-03-23 02:38:19 +01:00
|
|
|
private:
|
|
|
|
void saveConfig();
|
|
|
|
void setActiveInputLable(GraphicLabel* newLable);
|
2010-04-02 16:21:43 +02:00
|
|
|
void showMessageBox(const string &text, const string &header, bool toggle);
|
2012-10-16 23:08:45 +02:00
|
|
|
void showLuaMessageBox(const string &text, const string &header, bool toggle);
|
2012-10-22 07:08:52 +02:00
|
|
|
|
|
|
|
void setupTransifexUI();
|
2010-03-23 02:38:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}}//end namespace
|
|
|
|
|
|
|
|
#endif
|