ScummVM API documentation
dialogs.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef AGOS_DIALOGS_H
23 #define AGOS_DIALOGS_H
24 
25 #include "gui/ThemeEval.h"
26 #include "gui/widget.h"
27 #include "gui/widgets/popup.h"
28 
29 namespace AGOS {
30 
32  const char *label;
33  int configValue;
34 };
35 
36 #define POPUP_OPTIONS_ITEMS_TERMINATOR { nullptr, 0 }
37 
39  const char *guioFlag;
40  const char *label;
41  const char *tooltip;
42  const char *configOption;
43  int defaultState;
44  PopUpOptionsItem items[10];
45 };
46 
47 #define POPUP_OPTIONS_TERMINATOR \
48  { \
49  nullptr, nullptr, nullptr, nullptr, 0, { POPUP_OPTIONS_ITEMS_TERMINATOR } \
50  }
51 
53 public:
54  explicit OptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain);
55 
56  // OptionsContainerWidget API
57  void load() override;
58  bool save() override;
59 
60 private:
61  // OptionsContainerWidget API
62  void defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override;
63 
64  Common::String _guiOptions;
67 };
68 
69 static const ADExtraGuiOptionsMap optionsList[] = {
70  {
71  GAMEOPTION_COPY_PROTECTION,
72  {
73  _s("Enable copy protection"),
74  _s("Enable any copy protection that would otherwise be bypassed by default."),
75  "copy_protection",
76  false,
77  0,
78  0
79  },
80  },
81  {
82  GAMEOPTION_OPL3_MODE,
83  {
84  _s("AdLib OPL3 mode"),
85  _s("When AdLib is selected, OPL3 features will be used. Depending on the game, this will prevent cut-off notes, add extra notes or instruments and/or add stereo."),
86  "opl3_mode",
87  false,
88  0,
89  0
90  }
91  },
92  {
93  GAMEOPTION_DOS_TEMPOS,
94  {
95  _s("Use DOS version music tempos"),
96  _s("Selecting this option will play the music using the tempos used by the DOS version of the game. Otherwise, the faster tempos of the Windows version will be used."),
97  "dos_music_tempos",
98  true,
99  0,
100  0
101  }
102  },
103  {
104  GAMEOPTION_PREFER_DIGITAL_SFX,
105  {
106  _s("Prefer digital sound effects"),
107  _s("Prefer digital sound effects instead of synthesized ones"),
108  "prefer_digitalsfx",
109  true,
110  0,
111  0
112  }
113  },
114  {
115  GAMEOPTION_DISABLE_FADE_EFFECTS,
116  {
117  _s("Disable fade-out effects"),
118  _s("Don't fade every screen to black when leaving a room."),
119  "disable_fade_effects",
120  false,
121  0,
122  0
123  }
124  },
125  AD_EXTRA_GUI_OPTIONS_TERMINATOR
126 };
127 
128 static const PopUpOptionsMap popUpOptionsList[] = {
129  {
130  GAMEOPTION_MIDI_MODE,
131  _s("MIDI mode:"),
132  _s("When using external MIDI devices (e.g. through USB-MIDI), select your device here"),
133  "midi_mode",
134  kMidiModeStandard,
135  {
136  {
137  _s("Standard (GM / MT-32)"),
138  kMidiModeStandard
139  },
140  {
141  _s("Casio MT-540"),
142  kMidiModeMT540
143  },
144  {
145  _s("Casio CT-460 / CSM-1"),
146  kMidiModeCT460
147  },
148  POPUP_OPTIONS_ITEMS_TERMINATOR
149  }
150  },
151  POPUP_OPTIONS_TERMINATOR
152 };
153 
154 } // End of namespace AGOS
155 
156 #endif // AGOS_DIALOGS_H
Definition: str.h:59
Definition: advancedDetector.h:400
Definition: ThemeEval.h:37
Definition: widget.h:533
Definition: dialogs.h:52
Definition: agos.h:70
Definition: hashmap.h:85
Definition: dialogs.h:31
Definition: dialogs.h:38