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;
|
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-03-07 19:02:42 +00:00
|
|
|
OptionsDialog(const String &domain, String name);
|
|
|
|
|
|
|
|
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-04-19 01:05:28 +00:00
|
|
|
virtual void handleScreenChanged();
|
|
|
|
|
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;
|
|
|
|
|
2006-03-08 01:42:02 +00:00
|
|
|
void addGraphicControls(GuiObject *boss, String prefix);
|
|
|
|
void addAudioControls(GuiObject *boss, String prefix);
|
|
|
|
void addMIDIControls(GuiObject *boss, String prefix);
|
|
|
|
void addVolumeControls(GuiObject *boss, String prefix);
|
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);
|
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
|
|
|
CheckboxWidget *_subCheckbox;
|
|
|
|
|
|
|
|
//
|
|
|
|
// 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;
|
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:
|
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;
|
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
|