2008-06-24 23:19:23 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
2021-12-26 17:47:58 +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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2008-06-24 23:19:23 +00:00
|
|
|
*
|
|
|
|
* 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
|
2021-12-26 17:47:58 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2014-02-18 01:34:20 +00:00
|
|
|
*
|
2008-06-24 23:19:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GLOBAL_DIALOGS_H
|
|
|
|
#define GLOBAL_DIALOGS_H
|
|
|
|
|
|
|
|
#include "gui/dialog.h"
|
2020-03-08 21:10:56 +00:00
|
|
|
#include "gui/options.h"
|
2020-03-22 14:19:56 +00:00
|
|
|
#include "gui/widget.h"
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2008-11-12 22:25:19 +00:00
|
|
|
class Engine;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2008-11-12 22:25:19 +00:00
|
|
|
namespace GUI {
|
2011-04-25 19:29:26 +00:00
|
|
|
class ButtonWidget;
|
2011-04-24 08:34:27 +00:00
|
|
|
class CommandSender;
|
2011-04-25 19:29:26 +00:00
|
|
|
class GraphicsWidget;
|
|
|
|
class SaveLoadChooser;
|
2008-11-12 22:25:19 +00:00
|
|
|
}
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2008-11-12 12:50:21 +00:00
|
|
|
class MainMenuDialog : public GUI::Dialog {
|
2010-05-26 19:54:50 +00:00
|
|
|
public:
|
|
|
|
enum {
|
|
|
|
kSaveCmd = 'SAVE',
|
|
|
|
kLoadCmd = 'LOAD',
|
|
|
|
kPlayCmd = 'PLAY',
|
|
|
|
kOptionsCmd = 'OPTN',
|
|
|
|
kHelpCmd = 'HELP',
|
|
|
|
kAboutCmd = 'ABOU',
|
|
|
|
kQuitCmd = 'QUIT',
|
2020-05-12 02:20:40 +00:00
|
|
|
kLauncherCmd = 'LNCR',
|
2010-05-26 19:54:50 +00:00
|
|
|
kChooseCmd = 'CHOS'
|
|
|
|
};
|
|
|
|
|
2008-06-24 23:19:23 +00:00
|
|
|
public:
|
|
|
|
MainMenuDialog(Engine *engine);
|
|
|
|
~MainMenuDialog();
|
2008-07-02 00:30:49 +00:00
|
|
|
|
2022-04-29 05:45:24 +00:00
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2022-04-29 05:45:24 +00:00
|
|
|
virtual void reflowLayout() override;
|
2008-09-14 20:42:50 +00:00
|
|
|
|
2010-04-06 09:26:20 +00:00
|
|
|
protected:
|
|
|
|
void save();
|
|
|
|
void load();
|
|
|
|
|
2008-06-24 23:19:23 +00:00
|
|
|
protected:
|
2010-05-26 19:54:50 +00:00
|
|
|
Engine *_engine;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2010-05-26 19:54:50 +00:00
|
|
|
GUI::GraphicsWidget *_logo;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2020-05-12 02:20:40 +00:00
|
|
|
GUI::ButtonWidget *_returnToLauncherButton;
|
2010-05-26 19:54:50 +00:00
|
|
|
GUI::ButtonWidget *_helpButton;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2010-05-26 19:54:50 +00:00
|
|
|
GUI::Dialog *_aboutDialog;
|
2008-06-24 23:19:23 +00:00
|
|
|
|
2010-05-26 19:54:50 +00:00
|
|
|
GUI::SaveLoadChooser *_loadDialog;
|
|
|
|
GUI::SaveLoadChooser *_saveDialog;
|
2008-06-24 23:19:23 +00:00
|
|
|
};
|
|
|
|
|
2020-03-08 21:10:56 +00:00
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
class ConfigDialog : public OptionsDialog {
|
|
|
|
public:
|
|
|
|
ConfigDialog();
|
|
|
|
~ConfigDialog() override;
|
|
|
|
|
2020-03-22 14:19:56 +00:00
|
|
|
// OptionsDialog API
|
|
|
|
void build() override;
|
|
|
|
void apply() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
OptionsContainerWidget *_engineOptions;
|
2020-03-08 21:10:56 +00:00
|
|
|
};
|
|
|
|
|
2020-03-22 14:19:56 +00:00
|
|
|
class ExtraGuiOptionsWidget : public OptionsContainerWidget {
|
2022-03-28 07:50:07 +00:00
|
|
|
public:
|
|
|
|
enum {
|
|
|
|
kClickGroupLeaderCmd = 'CGLC'
|
|
|
|
};
|
|
|
|
|
2020-03-22 14:19:56 +00:00
|
|
|
public:
|
|
|
|
ExtraGuiOptionsWidget(GuiObject *widgetsBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options);
|
|
|
|
~ExtraGuiOptionsWidget() override;
|
|
|
|
|
2022-04-29 05:45:24 +00:00
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
2022-03-28 07:50:07 +00:00
|
|
|
|
2020-03-22 14:19:56 +00:00
|
|
|
// OptionsContainerWidget API
|
|
|
|
void load() override;
|
|
|
|
bool save() override;
|
|
|
|
|
2021-02-20 11:17:11 +00:00
|
|
|
protected:
|
|
|
|
void defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const override;
|
|
|
|
|
2020-03-22 14:19:56 +00:00
|
|
|
private:
|
|
|
|
typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
|
|
|
|
|
|
|
|
static Common::String dialogLayout(const Common::String &domain);
|
|
|
|
|
|
|
|
ExtraGuiOptions _options;
|
|
|
|
CheckboxWidgetList _checkboxes;
|
|
|
|
};
|
|
|
|
|
2020-03-08 21:10:56 +00:00
|
|
|
} // End of namespace GUI
|
|
|
|
|
2008-06-24 23:19:23 +00:00
|
|
|
#endif
|