ScummVM API documentation
ringworld_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 TSAGE_RINGWORLD_DIALOGS_H
23 #define TSAGE_RINGWORLD_DIALOGS_H
24 
25 #include "tsage/dialogs.h"
26 #include "tsage/events.h"
27 #include "tsage/graphics.h"
28 #include "common/list.h"
29 #include "common/rect.h"
30 #include "common/system.h"
31 
32 namespace TsAGE {
33 
34 namespace Ringworld {
35 
36 class RightClickButton : public GfxButton {
37 private:
38  GfxSurface *_savedButton;
39 public:
40  int _buttonIndex;
41 
42  RightClickButton(int buttonIndex, int xp, int yp);
43  ~RightClickButton() override { delete _savedButton; }
44 
45  void highlight() override;
46 };
47 
48 class RightClickDialog : public GfxDialog {
49 private:
50  GfxSurface _surface;
51  RightClickButton *_highlightedButton;
52  int _selectedAction;
53  RightClickButton _walkButton, _lookButton, _useButton, _talkButton, _inventoryButton, _optionsButton;
54 
55  RightClickButton *findButton(const Common::Point &pt);
56 public:
58  ~RightClickDialog() override;
59 
60  void draw() override;
61  bool process(Event &event) override;
62  void execute();
63 };
64 
65 class OptionsDialog : public ModalDialog {
66 private:
67  GfxButton _btnSave, _btnRestore, _btnRestart;
68  GfxButton _btnQuit, _btnResume;
69  GfxButton _btnSound;
70  GfxMessage _gfxMessage;
71 public:
72  OptionsDialog();
73  ~OptionsDialog() override {}
74  GfxButton *execute() { return GfxDialog::execute(&_btnResume); }
75 
76  static void show();
77 };
78 
79 /*--------------------------------------------------------------------------*/
80 
81 class GfxInvImage : public GfxImage {
82 public:
83  InvObject *_invObject;
84 public:
85  GfxInvImage() : GfxImage(), _invObject(NULL) {}
86 
87  bool process(Event &event) override;
88 };
89 
90 #define MAX_INVOBJECT_DISPLAY 20
91 
92 class InventoryDialog : public ModalDialog {
93 private:
95  GfxButton _btnOk, _btnLook;
96 public:
98  ~InventoryDialog() override;
99  void execute();
100 
101  static void show();
102 };
103 
104 } // End of namespace Ringworld
105 
106 } // End of namespace TsAGE
107 
108 #endif
Definition: ringworld_dialogs.h:81
Definition: ringworld_dialogs.h:65
Definition: array.h:52
Definition: ringworld_dialogs.h:92
Definition: graphics.h:318
Definition: ringworld_dialogs.h:48
Definition: graphics.h:79
Definition: core.h:47
Definition: rect.h:45
Definition: events.h:47
Definition: blueforce_dialogs.h:30
Definition: graphics.h:237
Definition: graphics.h:206
Definition: ringworld_dialogs.h:36
Definition: graphics.h:222
Definition: dialogs.h:47