2009-12-29 23:18:24 +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.
|
|
|
|
*
|
|
|
|
* 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.
|
2014-02-18 01:34:22 +00:00
|
|
|
*
|
2009-12-29 23:18:24 +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.
|
2014-02-18 01:34:22 +00:00
|
|
|
*
|
2009-12-29 23:18:24 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MOHAWK_DIALOGS_H
|
|
|
|
#define MOHAWK_DIALOGS_H
|
|
|
|
|
|
|
|
#include "mohawk/mohawk.h"
|
|
|
|
|
|
|
|
#include "common/events.h"
|
|
|
|
#include "common/str.h"
|
|
|
|
#include "gui/dialog.h"
|
|
|
|
|
2016-02-20 16:33:13 +00:00
|
|
|
namespace GUI {
|
|
|
|
class SaveLoadChooser;
|
2016-04-14 10:29:08 +00:00
|
|
|
class ButtonWidget;
|
|
|
|
class CheckboxWidget;
|
|
|
|
class CommandSender;
|
2017-02-15 05:30:27 +00:00
|
|
|
class PopUpWidget;
|
2016-04-14 10:29:08 +00:00
|
|
|
class StaticTextWidget;
|
2016-02-20 16:33:13 +00:00
|
|
|
}
|
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
namespace Mohawk {
|
|
|
|
|
|
|
|
class MohawkEngine;
|
|
|
|
|
|
|
|
class InfoDialog : public GUI::Dialog {
|
|
|
|
protected:
|
|
|
|
MohawkEngine *_vm;
|
|
|
|
Common::String _message;
|
|
|
|
GUI::StaticTextWidget *_text;
|
|
|
|
|
|
|
|
public:
|
2010-11-23 22:32:39 +00:00
|
|
|
InfoDialog(MohawkEngine *vm, const Common::String &message);
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2010-11-23 22:32:39 +00:00
|
|
|
void setInfoText(const Common::String &message);
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
virtual void handleMouseDown(int x, int y, int button, int clickCount) {
|
|
|
|
setResult(0);
|
|
|
|
close();
|
|
|
|
}
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
virtual void handleKeyDown(Common::KeyState state) {
|
|
|
|
setResult(state.ascii);
|
|
|
|
close();
|
|
|
|
}
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
virtual void reflowLayout();
|
|
|
|
};
|
|
|
|
|
|
|
|
class PauseDialog : public InfoDialog {
|
|
|
|
public:
|
2010-11-23 22:32:39 +00:00
|
|
|
PauseDialog(MohawkEngine* vm, const Common::String &message);
|
2009-12-29 23:18:24 +00:00
|
|
|
virtual void handleKeyDown(Common::KeyState state);
|
|
|
|
};
|
|
|
|
|
2016-07-04 18:40:44 +00:00
|
|
|
#if defined(ENABLE_MYST) || defined(ENABLE_RIVEN)
|
|
|
|
|
|
|
|
class MohawkOptionsDialog : public GUI::Dialog {
|
|
|
|
public:
|
|
|
|
MohawkOptionsDialog(MohawkEngine *_vm);
|
|
|
|
virtual ~MohawkOptionsDialog();
|
|
|
|
|
|
|
|
virtual void open() override;
|
|
|
|
virtual void reflowLayout() override;
|
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
2016-10-09 12:59:58 +00:00
|
|
|
|
2016-08-03 21:43:44 +00:00
|
|
|
int getLoadSlot() const {return _loadSlot;}
|
2016-07-04 18:40:44 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
MohawkEngine *_vm;
|
|
|
|
|
|
|
|
GUI::ButtonWidget *_loadButton;
|
|
|
|
GUI::ButtonWidget *_saveButton;
|
|
|
|
|
|
|
|
GUI::SaveLoadChooser *_loadDialog;
|
|
|
|
GUI::SaveLoadChooser *_saveDialog;
|
2016-10-09 12:59:58 +00:00
|
|
|
|
2016-08-03 21:43:44 +00:00
|
|
|
int _loadSlot;
|
2016-07-04 18:40:44 +00:00
|
|
|
|
|
|
|
void save();
|
|
|
|
void load();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2011-03-28 19:20:30 +00:00
|
|
|
#ifdef ENABLE_MYST
|
|
|
|
|
|
|
|
class MohawkEngine_Myst;
|
|
|
|
|
2016-07-04 18:40:44 +00:00
|
|
|
class MystOptionsDialog : public MohawkOptionsDialog {
|
2009-12-29 23:18:24 +00:00
|
|
|
public:
|
|
|
|
MystOptionsDialog(MohawkEngine_Myst *vm);
|
2016-07-04 18:40:44 +00:00
|
|
|
virtual ~MystOptionsDialog();
|
|
|
|
|
|
|
|
virtual void open() override;
|
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
private:
|
|
|
|
MohawkEngine_Myst *_vm;
|
2016-02-20 16:33:13 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
GUI::CheckboxWidget *_zipModeCheckbox;
|
2010-04-06 16:33:15 +00:00
|
|
|
GUI::CheckboxWidget *_transitionsCheckbox;
|
2016-02-20 16:33:13 +00:00
|
|
|
|
2011-05-14 17:26:33 +00:00
|
|
|
GUI::ButtonWidget *_dropPageButton;
|
2011-05-15 12:53:05 +00:00
|
|
|
GUI::ButtonWidget *_showMapButton;
|
2011-08-14 07:17:14 +00:00
|
|
|
GUI::ButtonWidget *_returnToMenuButton;
|
2009-12-29 23:18:24 +00:00
|
|
|
};
|
|
|
|
|
2011-03-28 19:20:30 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-29 03:41:32 +00:00
|
|
|
#ifdef ENABLE_RIVEN
|
|
|
|
|
|
|
|
class MohawkEngine_Riven;
|
|
|
|
|
2016-07-04 18:40:44 +00:00
|
|
|
class RivenOptionsDialog : public MohawkOptionsDialog {
|
2009-12-29 23:18:24 +00:00
|
|
|
public:
|
|
|
|
RivenOptionsDialog(MohawkEngine_Riven *vm);
|
2016-07-04 18:40:44 +00:00
|
|
|
virtual ~RivenOptionsDialog();
|
|
|
|
|
|
|
|
virtual void open() override;
|
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
2010-01-25 01:39:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
private:
|
|
|
|
MohawkEngine_Riven *_vm;
|
2016-07-04 18:40:44 +00:00
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
GUI::CheckboxWidget *_zipModeCheckbox;
|
|
|
|
GUI::CheckboxWidget *_waterEffectCheckbox;
|
2017-02-15 05:30:27 +00:00
|
|
|
GUI::StaticTextWidget *_transitionModeCaption;
|
|
|
|
GUI::PopUpWidget *_transitionModePopUp;
|
2009-12-29 23:18:24 +00:00
|
|
|
};
|
|
|
|
|
2011-03-29 03:41:32 +00:00
|
|
|
#endif
|
|
|
|
|
2009-12-29 23:18:24 +00:00
|
|
|
} // End of namespace Mohawk
|
|
|
|
|
|
|
|
#endif
|