2002-09-19 17:44:41 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2004-01-06 12:45:34 +00:00
|
|
|
* Copyright (C) 2002-2004 The ScummVM project
|
2002-09-19 17:44:41 +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 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SCUMM_DIALOGS_H
|
|
|
|
#define SCUMM_DIALOGS_H
|
|
|
|
|
2002-09-28 19:25:09 +00:00
|
|
|
#include "common/str.h"
|
2003-07-22 16:05:51 +00:00
|
|
|
#include "gui/about.h"
|
2002-09-19 17:44:41 +00:00
|
|
|
#include "gui/dialog.h"
|
2003-11-11 00:40:35 +00:00
|
|
|
#include "gui/options.h"
|
2003-11-02 14:50:53 +00:00
|
|
|
#include "gui/widget.h"
|
2002-09-19 17:44:41 +00:00
|
|
|
|
2003-06-14 21:18:14 +00:00
|
|
|
#ifndef DISABLE_HELP
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "scumm/help.h"
|
2003-06-14 21:18:14 +00:00
|
|
|
#endif
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
namespace GUI {
|
|
|
|
class ListWidget;
|
|
|
|
}
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
|
|
|
|
namespace Scumm {
|
|
|
|
|
2003-10-02 22:42:03 +00:00
|
|
|
class ScummEngine;
|
2002-09-19 17:44:41 +00:00
|
|
|
|
2003-11-11 00:40:35 +00:00
|
|
|
class ScummDialog : public GUI::Dialog {
|
2002-09-19 17:44:41 +00:00
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
ScummDialog(ScummEngine *scumm, int x, int y, int w, int h)
|
2003-11-11 00:40:35 +00:00
|
|
|
: GUI::Dialog(x, y, w, h), _scumm(scumm) {}
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
protected:
|
2003-10-02 17:43:02 +00:00
|
|
|
typedef Common::String String;
|
2002-09-28 19:25:09 +00:00
|
|
|
|
2003-10-02 22:42:03 +00:00
|
|
|
ScummEngine *_scumm;
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
// Query a string from the resources
|
2002-09-28 19:25:09 +00:00
|
|
|
const String queryResString(int stringno);
|
2002-09-19 17:44:41 +00:00
|
|
|
};
|
|
|
|
|
2003-11-28 21:56:14 +00:00
|
|
|
class SaveLoadChooser;
|
|
|
|
|
2003-11-03 23:26:13 +00:00
|
|
|
class MainMenuDialog : public ScummDialog {
|
2002-09-19 17:44:41 +00:00
|
|
|
public:
|
2003-11-03 23:26:13 +00:00
|
|
|
MainMenuDialog(ScummEngine *scumm);
|
|
|
|
~MainMenuDialog();
|
2003-11-11 00:40:35 +00:00
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
2002-10-22 22:41:12 +00:00
|
|
|
virtual void open();
|
|
|
|
virtual void close();
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
protected:
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::Dialog *_aboutDialog;
|
2003-06-14 21:18:14 +00:00
|
|
|
#ifndef DISABLE_HELP
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::Dialog *_helpDialog;
|
2003-06-14 21:18:14 +00:00
|
|
|
#endif
|
2003-11-28 21:56:14 +00:00
|
|
|
SaveLoadChooser *_saveDialog;
|
|
|
|
SaveLoadChooser *_loadDialog;
|
2003-06-14 21:18:14 +00:00
|
|
|
|
2002-10-19 01:22:41 +00:00
|
|
|
void save();
|
|
|
|
void load();
|
2002-09-19 17:44:41 +00:00
|
|
|
};
|
|
|
|
|
2003-06-14 21:18:14 +00:00
|
|
|
#ifndef DISABLE_HELP
|
|
|
|
|
|
|
|
class HelpDialog : public ScummDialog {
|
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
HelpDialog(ScummEngine *scumm);
|
2003-11-11 00:40:35 +00:00
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
2003-06-14 21:18:14 +00:00
|
|
|
|
|
|
|
protected:
|
2003-10-02 17:43:02 +00:00
|
|
|
typedef Common::String String;
|
2003-06-14 21:18:14 +00:00
|
|
|
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::ButtonWidget *_nextButton;
|
|
|
|
GUI::ButtonWidget *_prevButton;
|
2003-06-14 21:18:14 +00:00
|
|
|
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::StaticTextWidget *_title;
|
|
|
|
GUI::StaticTextWidget *_key[HELP_NUM_LINES];
|
|
|
|
GUI::StaticTextWidget *_dsc[HELP_NUM_LINES];
|
2003-06-14 21:18:14 +00:00
|
|
|
|
|
|
|
int _page;
|
|
|
|
int _numPages;
|
|
|
|
|
|
|
|
void displayKeyBindings();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2003-12-13 17:10:47 +00:00
|
|
|
class ConfigDialog : public GUI::OptionsDialog {
|
2002-09-19 17:44:41 +00:00
|
|
|
protected:
|
2003-11-11 00:40:35 +00:00
|
|
|
ScummEngine *_scumm;
|
2002-10-12 00:26:24 +00:00
|
|
|
#ifdef _WIN32_WCE
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::Dialog *_keysDialog;
|
2002-10-12 00:26:24 +00:00
|
|
|
#endif
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
public:
|
2003-12-13 17:10:47 +00:00
|
|
|
ConfigDialog(ScummEngine *scumm);
|
|
|
|
~ConfigDialog();
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
virtual void open();
|
2003-11-11 00:40:35 +00:00
|
|
|
virtual void close();
|
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
protected:
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::CheckboxWidget *subtitlesCheckbox;
|
2002-10-12 00:26:24 +00:00
|
|
|
};
|
|
|
|
|
2002-10-27 12:26:41 +00:00
|
|
|
class InfoDialog : public ScummDialog {
|
2002-10-12 00:26:24 +00:00
|
|
|
public:
|
2002-10-27 12:26:41 +00:00
|
|
|
// arbitrary message
|
2003-11-02 02:18:16 +00:00
|
|
|
InfoDialog(ScummEngine *scumm, const String& message);
|
2002-10-27 12:26:41 +00:00
|
|
|
// from resources
|
2003-11-02 02:18:16 +00:00
|
|
|
InfoDialog(ScummEngine *scumm, int res);
|
2002-10-12 00:26:24 +00:00
|
|
|
|
2003-03-06 17:58:13 +00:00
|
|
|
virtual void handleMouseDown(int x, int y, int button, int clickCount) {
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers) {
|
|
|
|
setResult(ascii);
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
|
2002-10-27 12:26:41 +00:00
|
|
|
protected:
|
|
|
|
void setInfoText (const String& message);
|
|
|
|
};
|
|
|
|
|
|
|
|
class PauseDialog : public InfoDialog {
|
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
PauseDialog(ScummEngine *scumm);
|
2003-07-28 01:36:16 +00:00
|
|
|
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
|
|
|
|
};
|
|
|
|
|
2003-12-14 20:36:37 +00:00
|
|
|
class ConfirmDialog : public InfoDialog {
|
2003-12-14 15:04:05 +00:00
|
|
|
public:
|
2003-12-14 20:36:37 +00:00
|
|
|
ConfirmDialog(ScummEngine *scumm, const String& message);
|
2003-12-14 15:04:05 +00:00
|
|
|
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
|
|
|
|
};
|
|
|
|
|
2002-10-22 22:41:12 +00:00
|
|
|
#ifdef _WIN32_WCE
|
|
|
|
|
|
|
|
class KeysDialog : public ScummDialog {
|
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
KeysDialog(ScummEngine *scumm);
|
2002-10-22 22:41:12 +00:00
|
|
|
|
2003-11-11 00:40:35 +00:00
|
|
|
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
2002-11-22 14:02:54 +00:00
|
|
|
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
|
2002-10-22 22:41:12 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2003-11-11 00:40:35 +00:00
|
|
|
GUI::ListWidget *_actionsList;
|
|
|
|
GUI::StaticTextWidget *_actionTitle;
|
|
|
|
GUI::StaticTextWidget *_keyMapping;
|
2002-10-22 22:41:12 +00:00
|
|
|
int _actionSelected;
|
|
|
|
};
|
2002-09-19 17:44:41 +00:00
|
|
|
|
|
|
|
#endif
|
2002-10-22 22:41:12 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|
|
|
|
|
2002-11-06 00:56:31 +00:00
|
|
|
#endif
|