2002-12-12 23:22:48 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2006-01-18 17:39:49 +00:00
|
|
|
* Copyright (C) 2002-2006 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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-12-12 23:22:48 +00:00
|
|
|
*
|
2006-02-11 10:08:56 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2002-12-12 23:22:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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-07-05 20:22:56 +00:00
|
|
|
#ifdef SMALL_SCREEN_DEVICE
|
|
|
|
#include "gui/KeysDialog.h"
|
2005-01-10 20:53:16 +00:00
|
|
|
#endif
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
namespace GUI {
|
|
|
|
|
2005-04-16 17:55:09 +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;
|
2006-10-08 18:22:28 +00:00
|
|
|
class ListWidget;
|
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);
|
2006-06-03 13:33:39 +00:00
|
|
|
OptionsDialog(const String &domain, const String &name);
|
2006-03-07 19:02:42 +00:00
|
|
|
|
|
|
|
void init();
|
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);
|
|
|
|
|
2006-08-04 13:55:53 +00:00
|
|
|
virtual void reflowLayout();
|
2006-04-19 01:05:28 +00:00
|
|
|
|
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;
|
2005-05-16 06:33:33 +00:00
|
|
|
|
|
|
|
ButtonWidget *_soundFontButton;
|
2005-04-10 14:33:44 +00:00
|
|
|
StaticTextWidget *_soundFont;
|
2007-02-13 19:55:20 +00:00
|
|
|
ButtonWidget *_soundFontClearButton;
|
2005-04-10 14:33:44 +00:00
|
|
|
|
2006-06-03 13:33:39 +00:00
|
|
|
void addGraphicControls(GuiObject *boss, const String &prefix);
|
|
|
|
void addAudioControls(GuiObject *boss, const String &prefix);
|
|
|
|
void addMIDIControls(GuiObject *boss, const String &prefix);
|
|
|
|
void addVolumeControls(GuiObject *boss, const String &prefix);
|
2006-05-13 17:30:04 +00:00
|
|
|
// The default value is the launcher's non-scaled talkspeed value. When SCUMM uses the widget,
|
|
|
|
// it uses its own scale
|
2006-06-03 13:33:39 +00:00
|
|
|
void addSubtitleControls(GuiObject *boss, const String &prefix, int maxSliderVal = 255);
|
2003-11-08 23:22:16 +00:00
|
|
|
|
2003-11-07 16:01:51 +00:00
|
|
|
void setGraphicSettingsState(bool enabled);
|
|
|
|
void setAudioSettingsState(bool enabled);
|
2005-04-13 00:11:49 +00:00
|
|
|
void setMIDISettingsState(bool enabled);
|
2003-11-07 16:01:51 +00:00
|
|
|
void setVolumeSettingsState(bool enabled);
|
2006-05-13 17:30:04 +00:00
|
|
|
void setSubtitleSettingsState(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;
|
2005-02-20 00:17:22 +00:00
|
|
|
PopUpWidget *_renderModePopUp;
|
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;
|
2005-04-13 00:11:49 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// MIDI controls
|
|
|
|
//
|
|
|
|
bool _enableMIDISettings;
|
2003-11-05 12:25:42 +00:00
|
|
|
CheckboxWidget *_multiMidiCheckbox;
|
|
|
|
CheckboxWidget *_mt32Checkbox;
|
2005-04-13 00:11:49 +00:00
|
|
|
CheckboxWidget *_enableGSCheckbox;
|
2006-06-11 20:51:14 +00:00
|
|
|
StaticTextWidget *_midiGainDesc;
|
|
|
|
SliderWidget *_midiGainSlider;
|
|
|
|
StaticTextWidget *_midiGainLabel;
|
2006-05-13 17:30:04 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Subtitle controls
|
|
|
|
//
|
|
|
|
int getSubtitleMode(bool subtitles, bool speech_mute);
|
|
|
|
bool _enableSubtitleSettings;
|
|
|
|
StaticTextWidget *_subToggleDesc;
|
|
|
|
ButtonWidget *_subToggleButton;
|
|
|
|
int _subMode;
|
|
|
|
static const char *_subModeDesc[];
|
|
|
|
StaticTextWidget *_subSpeedDesc;
|
|
|
|
SliderWidget *_subSpeedSlider;
|
|
|
|
StaticTextWidget *_subSpeedLabel;
|
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;
|
|
|
|
|
2006-05-13 17:30:04 +00:00
|
|
|
StaticTextWidget *_musicVolumeDesc;
|
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
|
|
|
|
2006-05-13 17:30:04 +00:00
|
|
|
StaticTextWidget *_sfxVolumeDesc;
|
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
|
|
|
|
2006-05-13 17:30:04 +00:00
|
|
|
StaticTextWidget *_speechVolumeDesc;
|
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:
|
2005-04-22 21:20:22 +00:00
|
|
|
GlobalOptionsDialog();
|
2003-11-05 12:25:42 +00:00
|
|
|
~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:
|
2005-07-05 20:22:56 +00:00
|
|
|
#ifdef SMALL_SCREEN_DEVICE
|
|
|
|
KeysDialog *_keysDialog;
|
2005-01-10 20:53:16 +00:00
|
|
|
#endif
|
2003-11-05 12:25:42 +00:00
|
|
|
StaticTextWidget *_savePath;
|
2006-06-11 20:40:22 +00:00
|
|
|
StaticTextWidget *_themePath;
|
2004-11-15 04:41:51 +00:00
|
|
|
StaticTextWidget *_extraPath;
|
2006-10-08 18:22:28 +00:00
|
|
|
|
|
|
|
StaticTextWidget *_curTheme;
|
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
|