ScummVM API documentation
editgamedialog.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 GUI_EDITGAMEDIALOG_H
23#define GUI_EDITGAMEDIALOG_H
24
25#include "engines/game.h"
26#include "gui/dialog.h"
27#include "gui/options.h"
28#include "gui/widget.h"
29
30namespace GUI {
31
32class BrowserDialog;
33class CommandSender;
34class DomainEditTextWidget;
35class ListWidget;
36class ButtonWidget;
37class PicButtonWidget;
38class GraphicsWidget;
39class StaticTextWidget;
40class EditTextWidget;
41class SaveLoadChooser;
42
43/*
44* A dialog that allows the user to edit a config game entry.
45* TODO: add widgets for some/all of the following
46* - Maybe scaler/graphics mode. But there are two problems:
47* 1) Different backends can have different scalers with different names,
48* so we first have to add a way to query those... no Ender, I don't
49* think a bitmasked property() value is nice for this, because we would
50* have to add to the bitmask values whenever a backends adds a new scaler).
51* 2) At the time the launcher is running, the GFX backend is already setup.
52* So when a game is run via the launcher, the custom scaler setting for it won't be
53* used. So we'd also have to add an API to change the scaler during runtime
54* (the SDL backend can already do that based on user input, but there is no API
55* to achieve it)
56* If the APIs for 1&2 are in place, we can think about adding this to the Edit&Option dialogs
57*/
58
60public:
61 EditGameDialog(const Common::String &domain);
62
63 void open() override;
64 void apply() override;
65 void close() override;
66 void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
67
68protected:
69 void setupGraphicsTab() override;
70
71 void addGameControls(GuiObject *boss, const Common::String &prefix, const Common::String &description);
72
73 EditTextWidget *_descriptionWidget;
74 DomainEditTextWidget *_domainWidget;
75
76 PathWidget *_gamePathWidget;
77 PathWidget *_extraPathWidget;
78 PathWidget *_savePathWidget;
79 ButtonWidget *_extraPathClearButton;
80 ButtonWidget *_savePathClearButton;
81
82 StaticTextWidget *_langPopUpDesc;
83 PopUpWidget *_langPopUp;
84 StaticTextWidget *_platformPopUpDesc;
85 PopUpWidget *_platformPopUp;
86
87 CheckboxWidget *_globalGraphicsOverride;
88 CheckboxWidget *_globalBackendOverride;
89 CheckboxWidget *_globalAudioOverride;
90 CheckboxWidget *_globalMIDIOverride;
91 CheckboxWidget *_globalMT32Override;
92 CheckboxWidget *_globalVolumeOverride;
93
94 CheckboxWidget *_enableHotspotsCheckbox;
95 StaticTextWidget *_hotspotMarkerPopUpDesc;
96 PopUpWidget *_hotspotMarkerPopUp;
97 CheckboxWidget *_showHotspotTextCheckbox;
98
99 ScrollContainerWidget *_gameContainer;
100 OptionsContainerWidget *_engineOptions;
101};
102
103} // End of namespace GUI
104
105#endif
Definition: str.h:59
Definition: widget.h:241
Definition: widget.h:338
Definition: object.h:40
Definition: editgamedialog.h:59
Definition: edittext.h:32
Definition: object.h:60
Definition: widget.h:542
Definition: options.h:61
Definition: widget.h:473
Definition: popup.h:39
Definition: scrollcontainer.h:32
Definition: widget.h:213