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 MOHAWK_DIALOGS_H
23#define MOHAWK_DIALOGS_H
24
25#include "mohawk/mohawk.h"
26
27#include "common/events.h"
28#include "common/str.h"
29#include "common/ustr.h"
30
31#include "engines/dialogs.h"
32
33#include "gui/dialog.h"
34#include "gui/widget.h"
35
36namespace GUI {
37class SaveLoadChooser;
38class ButtonWidget;
39class CheckboxWidget;
40class CommandSender;
41class PopUpWidget;
42class StaticTextWidget;
43}
44
45namespace Mohawk {
46
47class MohawkEngine;
48
49class InfoDialog : public GUI::Dialog {
50protected:
51 MohawkEngine *_vm;
52 Common::U32String _message;
54
55public:
56 InfoDialog(MohawkEngine *vm, const Common::U32String &message);
57
58 void setInfoText(const Common::U32String &message);
59
60 void handleMouseDown(int x, int y, int button, int clickCount) override {
61 setResult(0);
62 close();
63 }
64
65 void handleKeyDown(Common::KeyState state) override {
66 setResult(state.ascii);
67 close();
68 }
69
70 void reflowLayout() override;
71};
72
73class PauseDialog : public InfoDialog {
74public:
75 PauseDialog(MohawkEngine* vm, const Common::U32String &message);
76 void handleKeyDown(Common::KeyState state) override;
77};
78
79#ifdef ENABLE_MYST
80
81class MystOptionsWidget : public GUI::OptionsContainerWidget {
82public:
83 MystOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain);
84 ~MystOptionsWidget() override;
85
86 // Widget API
87 void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
88
89 // OptionsContainerWidget API
90 void load() override;
91 bool save() override;
92
93private:
94 // OptionsContainerWidget API
95 void defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override;
96
97 bool isInGame() const;
98
99 GUI::CheckboxWidget *_zipModeCheckbox;
100 GUI::CheckboxWidget *_transitionsCheckbox;
101 GUI::CheckboxWidget *_mystFlyByCheckbox;
102 GUI::CheckboxWidget *_spaceshipFuzzyLogicCheckbox;
103 GUI::CheckboxWidget *_addCdromDelayCheckbox;
104
105 GUI::PopUpWidget *_languagePopUp;
106
107 GUI::ButtonWidget *_dropPageButton;
108 GUI::ButtonWidget *_showMapButton;
109 GUI::ButtonWidget *_returnToMenuButton;
110};
111
112class MystMenuDialog : public MainMenuDialog {
113public:
114 MystMenuDialog(Engine *engine);
115 ~MystMenuDialog() override;
116
117 // MainMenuDialog API
118 void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
119};
120
121#endif
122
123#ifdef ENABLE_RIVEN
124
125class RivenOptionsWidget : public GUI::OptionsContainerWidget {
126public:
127 explicit RivenOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain);
128 ~RivenOptionsWidget() override;
129
130 // OptionsContainerWidget API
131 void load() override;
132 bool save() override;
133
134private:
135 // OptionsContainerWidget API
136 void defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override;
137
138 GUI::CheckboxWidget *_zipModeCheckbox;
139 GUI::CheckboxWidget *_waterEffectCheckbox;
140 GUI::PopUpWidget *_transitionModePopUp;
141 GUI::PopUpWidget *_languagePopUp;
142};
143
144#endif
145
147public:
148 MohawkDefaultOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain);
150
151 // OptionsContainerWidget API
152 void load() override;
153 bool save() override;
154
155private:
156 // OptionsContainerWidget API
157 void defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override;
158
159 GUI::CheckboxWidget *_audioPopFixCheckbox;
160};
161
162} // End of namespace Mohawk
163
164#endif
Definition: str.h:59
Definition: ustr.h:57
Definition: engine.h:149
Definition: widget.h:241
Definition: widget.h:338
Definition: object.h:40
Definition: dialog.h:49
Definition: widget.h:542
Definition: popup.h:39
Definition: widget.h:213
Definition: ThemeEval.h:37
Definition: dialogs.h:38
Definition: dialogs.h:49
Definition: dialogs.h:146
Definition: mohawk.h:54
Definition: dialogs.h:73
Definition: bitmap.h:32
Definition: keyboard.h:294
uint16 ascii
Definition: keyboard.h:310