2002-12-12 23:22:48 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2005-01-01 16:09:25 +00:00
|
|
|
* Copyright (C) 2002-2005 The ScummVM project
|
2002-12-12 23:22:48 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it 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.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPTIONS_DIALOG_H
|
|
|
|
#define OPTIONS_DIALOG_H
|
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
#include "gui/dialog.h"
|
2002-12-12 23:22:48 +00:00
|
|
|
#include "common/str.h"
|
|
|
|
|
2005-01-10 20:53:16 +00:00
|
|
|
#ifdef _WIN32_WCE
|
|
|
|
#include "backends/wince/CEKeysDialog.h"
|
|
|
|
#endif
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
class GameDetector;
|
|
|
|
|
|
|
|
namespace GUI {
|
|
|
|
|
2003-03-25 15:32:36 +00:00
|
|
|
class BrowserDialog;
|
2003-11-05 01:15:10 +00:00
|
|
|
class CheckboxWidget;
|
2003-03-26 20:43:58 +00:00
|
|
|
class PopUpWidget;
|
2003-11-02 14:50:53 +00:00
|
|
|
class SliderWidget;
|
|
|
|
class StaticTextWidget;
|
2002-12-12 23:22:48 +00:00
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
class OptionsDialog : public Dialog {
|
2003-10-02 17:43:02 +00:00
|
|
|
typedef Common::String String;
|
2002-12-12 23:22:48 +00:00
|
|
|
public:
|
2003-11-05 12:25:42 +00:00
|
|
|
OptionsDialog(const String &domain, int x, int y, int w, int h);
|
2002-12-12 23:22:48 +00:00
|
|
|
|
2003-03-25 15:32:36 +00:00
|
|
|
void open();
|
2003-11-05 12:25:42 +00:00
|
|
|
void close();
|
2002-12-12 23:22:48 +00:00
|
|
|
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
enum {
|
2004-03-15 02:28:47 +00:00
|
|
|
kOKCmd = 'ok '
|
2003-11-05 12:25:42 +00:00
|
|
|
};
|
|
|
|
|
2002-12-12 23:22:48 +00:00
|
|
|
protected:
|
2003-11-05 12:25:42 +00:00
|
|
|
/** Config domain this dialog is used to edit. */
|
|
|
|
String _domain;
|
|
|
|
|
|
|
|
int addGraphicControls(GuiObject *boss, int yoffset);
|
|
|
|
int addMIDIControls(GuiObject *boss, int yoffset);
|
|
|
|
int addVolumeControls(GuiObject *boss, int yoffset);
|
2003-11-08 23:22:16 +00:00
|
|
|
|
2003-11-07 16:01:51 +00:00
|
|
|
void setGraphicSettingsState(bool enabled);
|
|
|
|
void setAudioSettingsState(bool enabled);
|
|
|
|
void setVolumeSettingsState(bool enabled);
|
2003-03-25 15:32:36 +00:00
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
private:
|
|
|
|
//
|
|
|
|
// Graphics controls
|
|
|
|
//
|
2003-11-07 16:01:51 +00:00
|
|
|
bool _enableGraphicSettings;
|
2003-11-05 01:15:10 +00:00
|
|
|
PopUpWidget *_gfxPopUp;
|
|
|
|
CheckboxWidget *_fullscreenCheckbox;
|
|
|
|
CheckboxWidget *_aspectCheckbox;
|
2003-03-26 20:43:58 +00:00
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
//
|
2004-01-17 13:21:15 +00:00
|
|
|
// Audio controls
|
2003-11-05 12:25:42 +00:00
|
|
|
//
|
2003-11-07 16:01:51 +00:00
|
|
|
bool _enableAudioSettings;
|
2003-11-05 01:15:10 +00:00
|
|
|
PopUpWidget *_midiPopUp;
|
2003-11-05 12:25:42 +00:00
|
|
|
CheckboxWidget *_multiMidiCheckbox;
|
|
|
|
CheckboxWidget *_mt32Checkbox;
|
2004-01-17 13:21:15 +00:00
|
|
|
CheckboxWidget *_subCheckbox;
|
2003-03-25 15:32:36 +00:00
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
//
|
|
|
|
// Volume controls
|
|
|
|
//
|
2003-11-07 16:01:51 +00:00
|
|
|
bool _enableVolumeSettings;
|
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
SliderWidget *_musicVolumeSlider;
|
2003-03-25 15:32:36 +00:00
|
|
|
StaticTextWidget *_musicVolumeLabel;
|
2003-11-05 12:25:42 +00:00
|
|
|
|
|
|
|
SliderWidget *_sfxVolumeSlider;
|
2003-03-25 15:32:36 +00:00
|
|
|
StaticTextWidget *_sfxVolumeLabel;
|
2004-04-05 18:24:36 +00:00
|
|
|
|
2004-04-06 11:50:35 +00:00
|
|
|
SliderWidget *_speechVolumeSlider;
|
|
|
|
StaticTextWidget *_speechVolumeLabel;
|
2003-11-05 12:25:42 +00:00
|
|
|
};
|
2003-11-05 01:15:10 +00:00
|
|
|
|
2003-11-05 12:25:42 +00:00
|
|
|
|
|
|
|
class GlobalOptionsDialog : public OptionsDialog {
|
|
|
|
typedef Common::String String;
|
|
|
|
public:
|
|
|
|
GlobalOptionsDialog(GameDetector &detector);
|
|
|
|
~GlobalOptionsDialog();
|
|
|
|
|
2004-03-15 02:28:47 +00:00
|
|
|
void open();
|
|
|
|
void close();
|
2003-11-05 12:25:42 +00:00
|
|
|
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
BrowserDialog *_browser;
|
2005-01-10 20:53:16 +00:00
|
|
|
#ifdef _WIN32_WCE
|
|
|
|
CEKeysDialog *_keysDialog;
|
|
|
|
#endif
|
2003-11-05 12:25:42 +00:00
|
|
|
StaticTextWidget *_savePath;
|
2004-11-15 04:41:51 +00:00
|
|
|
StaticTextWidget *_extraPath;
|
2002-12-12 23:22:48 +00:00
|
|
|
};
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
} // End of namespace GUI
|
|
|
|
|
2002-12-12 23:22:48 +00:00
|
|
|
#endif
|