2010-03-23 01:38:19 +00:00
|
|
|
|
// ==============================================================
|
|
|
|
|
// This file is part of Glest (www.glest.org)
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2001-2005 Marti<74>o Figueroa
|
|
|
|
|
//
|
2010-12-24 03:36:34 +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
|
2010-03-23 01:38:19 +00: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 05:25:40 +00:00
|
|
|
|
#include "leak_dumper.h"
|
2010-03-23 01:38:19 +00:00
|
|
|
|
|
|
|
|
|
namespace Glest{ namespace Game{
|
|
|
|
|
|
|
|
|
|
// ===============================
|
2010-12-24 03:36:34 +00:00
|
|
|
|
// class MenuStateOptions
|
2010-03-23 01:38:19 +00:00
|
|
|
|
// ===============================
|
|
|
|
|
|
|
|
|
|
class MenuStateOptions: public MenuState{
|
|
|
|
|
private:
|
2010-09-09 06:42:39 +00:00
|
|
|
|
|
2010-12-24 03:36:34 +00:00
|
|
|
|
GraphicButton buttonOk;
|
2010-03-23 01:38:19 +00:00
|
|
|
|
GraphicButton buttonAbort;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
GraphicButton buttonAutoConfig;
|
2010-07-11 07:38:08 +00:00
|
|
|
|
GraphicButton buttonVideoInfo;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
GraphicButton buttonKeyboardSetup; // configure the keyboard
|
|
|
|
|
|
2010-03-23 01:38:19 +00:00
|
|
|
|
GraphicLabel labelLang;
|
|
|
|
|
GraphicLabel labelShadows;
|
|
|
|
|
GraphicLabel labelFilter;
|
|
|
|
|
GraphicLabel labelTextures3D;
|
|
|
|
|
GraphicLabel labelLights;
|
|
|
|
|
GraphicLabel labelUnitParticles;
|
2011-03-06 13:11:22 +00:00
|
|
|
|
GraphicLabel labelTilesetParticles;
|
2010-07-16 06:35:22 +00:00
|
|
|
|
GraphicLabel labelSoundFactory;
|
2010-03-23 01:38:19 +00:00
|
|
|
|
GraphicLabel labelVolumeFx;
|
|
|
|
|
GraphicLabel labelVolumeAmbient;
|
|
|
|
|
GraphicLabel labelVolumeMusic;
|
|
|
|
|
GraphicListBox listBoxLang;
|
|
|
|
|
GraphicListBox listBoxShadows;
|
|
|
|
|
GraphicListBox listBoxFilter;
|
2010-12-27 00:59:57 +00:00
|
|
|
|
GraphicCheckBox checkBoxTextures3D;
|
2010-03-23 01:38:19 +00:00
|
|
|
|
GraphicListBox listBoxLights;
|
2010-12-27 00:59:57 +00:00
|
|
|
|
GraphicCheckBox checkBoxUnitParticles;
|
2011-03-06 13:11:22 +00:00
|
|
|
|
GraphicCheckBox checkBoxTilesetParticles;
|
2010-07-16 06:35:22 +00:00
|
|
|
|
GraphicListBox listBoxSoundFactory;
|
2010-03-23 01:38:19 +00:00
|
|
|
|
GraphicListBox listBoxVolumeFx;
|
|
|
|
|
GraphicListBox listBoxVolumeAmbient;
|
|
|
|
|
GraphicListBox listBoxVolumeMusic;
|
|
|
|
|
GraphicLabel labelPlayerName;
|
|
|
|
|
GraphicLabel labelPlayerNameLabel;
|
|
|
|
|
GraphicLabel *activeInputLabel;
|
2010-04-03 17:17:15 +00:00
|
|
|
|
GraphicLabel labelServerPort;
|
|
|
|
|
GraphicLabel labelServerPortLabel;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
|
|
|
|
|
2010-04-01 00:13:28 +00:00
|
|
|
|
GraphicLabel labelScreenModes;
|
|
|
|
|
GraphicListBox listBoxScreenModes;
|
2011-04-18 23:31:33 +00:00
|
|
|
|
vector<ModeInfo> modeInfos;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-05-03 22:07:27 +00:00
|
|
|
|
GraphicLabel labelFullscreenWindowed;
|
2010-12-27 00:59:57 +00:00
|
|
|
|
GraphicCheckBox checkBoxFullscreenWindowed;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-04-01 00:13:28 +00:00
|
|
|
|
GraphicLabel labelVideoSection;
|
|
|
|
|
GraphicLabel labelAudioSection;
|
|
|
|
|
GraphicLabel labelMiscSection;
|
2011-01-09 18:05:10 +00:00
|
|
|
|
GraphicLabel labelNetworkSettings;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-04-07 22:20:28 +00:00
|
|
|
|
GraphicLabel labelFontSizeAdjustment;
|
|
|
|
|
GraphicListBox listFontSizeAdjustment;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-09-26 21:34:00 +00:00
|
|
|
|
GraphicLabel labelMapPreview;
|
2010-12-27 00:59:57 +00:00
|
|
|
|
GraphicCheckBox checkBoxMapPreview;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-04-02 14:21:43 +00:00
|
|
|
|
GraphicMessageBox mainMessageBox;
|
|
|
|
|
int mainMessageBoxState;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-10-11 00:53:25 +00:00
|
|
|
|
GraphicLabel labelPublishServerExternalPort;
|
|
|
|
|
GraphicListBox listBoxPublishServerExternalPort;
|
2010-12-24 03:36:34 +00:00
|
|
|
|
|
2010-03-23 01:38:19 +00:00
|
|
|
|
|
2011-01-06 07:15:43 +00:00
|
|
|
|
GraphicLabel labelEnableFTP;
|
2011-01-07 05:32:47 +00:00
|
|
|
|
GraphicCheckBox checkBoxEnableFTP;
|
|
|
|
|
|
|
|
|
|
GraphicLabel labelEnableFTPServer;
|
|
|
|
|
GraphicCheckBox checkBoxEnableFTPServer;
|
2011-01-06 07:15:43 +00:00
|
|
|
|
|
|
|
|
|
GraphicLabel labelFTPServerPortLabel;
|
|
|
|
|
GraphicLabel labelFTPServerPort;
|
|
|
|
|
|
|
|
|
|
GraphicLabel labelFTPServerDataPortsLabel;
|
|
|
|
|
GraphicLabel labelFTPServerDataPorts;
|
|
|
|
|
|
2011-03-11 12:14:24 +00:00
|
|
|
|
GraphicLabel labelEnableFTPServerInternetTilesetXfer;
|
|
|
|
|
GraphicCheckBox checkBoxEnableFTPServerInternetTilesetXfer;
|
|
|
|
|
|
|
|
|
|
GraphicLabel labelEnableFTPServerInternetTechtreeXfer;
|
|
|
|
|
GraphicCheckBox checkBoxEnableFTPServerInternetTechtreeXfer;
|
|
|
|
|
|
2011-01-25 23:30:51 +00:00
|
|
|
|
GraphicLabel labelEnablePrivacy;
|
|
|
|
|
GraphicCheckBox checkBoxEnablePrivacy;
|
|
|
|
|
|
2011-03-31 01:34:01 +00:00
|
|
|
|
GraphicLabel labelEnableTextureCompression;
|
|
|
|
|
GraphicCheckBox checkBoxEnableTextureCompression;
|
|
|
|
|
|
2011-04-02 21:17:17 +00:00
|
|
|
|
GraphicLabel labelScreenShotType;
|
|
|
|
|
GraphicListBox listBoxScreenShotType;
|
|
|
|
|
|
2011-04-19 03:26:42 +00:00
|
|
|
|
GraphicLabel labelDisableScreenshotConsoleText;
|
|
|
|
|
GraphicCheckBox checkBoxDisableScreenshotConsoleText;
|
|
|
|
|
|
2011-08-31 20:10:43 +00:00
|
|
|
|
GraphicLabel labelMouseMoveScrollsWorld;
|
|
|
|
|
GraphicCheckBox checkBoxMouseMoveScrollsWorld;
|
|
|
|
|
|
2011-06-09 22:54:45 +00:00
|
|
|
|
GraphicLabel labelVisibleHud;
|
|
|
|
|
GraphicCheckBox checkBoxVisibleHud;
|
|
|
|
|
|
2011-06-20 23:48:22 +00:00
|
|
|
|
GraphicLabel labelRainEffect;
|
|
|
|
|
GraphicCheckBox checkBoxRainEffect;
|
2011-06-09 22:54:45 +00:00
|
|
|
|
|
2011-04-02 21:17:17 +00:00
|
|
|
|
|
2010-03-23 01:38:19 +00:00
|
|
|
|
public:
|
|
|
|
|
MenuStateOptions(Program *program, MainMenu *mainMenu);
|
|
|
|
|
|
|
|
|
|
void mouseClick(int x, int y, MouseButton mouseButton);
|
|
|
|
|
void mouseMove(int x, int y, const MouseState *mouseState);
|
|
|
|
|
void render();
|
2011-06-26 01:55:08 +00:00
|
|
|
|
virtual void keyDown(SDL_KeyboardEvent key);
|
|
|
|
|
virtual void keyPress(SDL_KeyboardEvent c);
|
2011-04-20 16:25:16 +00:00
|
|
|
|
virtual bool isInSpecialKeyCaptureEvent();
|
2010-03-23 01:38:19 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void saveConfig();
|
|
|
|
|
void setActiveInputLable(GraphicLabel* newLable);
|
2010-04-02 14:21:43 +00:00
|
|
|
|
void showMessageBox(const string &text, const string &header, bool toggle);
|
2010-03-23 01:38:19 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}}//end namespace
|
|
|
|
|
|
|
|
|
|
#endif
|