ScummVM API documentation
interface.h
1
2/* ScummVM - Graphic Adventure Engine
3 *
4 * ScummVM is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT
6 * file distributed with this source distribution.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef M4_BURGER_INTERFACE_H
24#define M4_BURGER_INTERFACE_H
25
26#include "m4/adv_r/adv_interface.h"
27#include "m4/adv_r/adv_hotspot.h"
28#include "m4/burger/gui/inventory.h"
29
30namespace M4 {
31namespace Burger {
32namespace GUI {
33
34struct Interface : public M4::Interface {
35private:
36 void setup();
37
38 void trackIcons();
39 ControlStatus trackHotspots(int event, int x, int y);
40 void dispatch_command();
41 void handleState(ControlStatus status);
42
43public:
44 int _sprite = 22; // main_interface_sprite;
45 GUI::InterfaceBox *_interfaceBox = nullptr;
46 GUI::Inventory *_inventory = nullptr;
47 GUI::TextField *_textField = nullptr;
48 GUI::ButtonClass *_btnTake = nullptr;
49 GUI::ButtonClass *_btnManipulate = nullptr;
50 GUI::ButtonClass *_btnHandle = nullptr;
51 GUI::ButtonClass *_btnAbductFail = nullptr;
52 GUI::ButtonClass *_btnMenu = nullptr;
53 GUI::ButtonClass *_btnScrollLeft = nullptr;
54 GUI::ButtonClass *_btnScrollRight = nullptr;
55 const HotSpotRec *_hotspot = nullptr;
56 int _savedX = 0, _savedY = 0;
57 char _prepText[40] = { 0 };
58 char _nounText[40] = { 0 };
59 char _verbText[40] = { 0 };
60 bool _iconSelected = false;
61 int _state = 0;
62
63 Interface();
64 ~Interface() override;
65
66 bool init(int arrow, int wait, int look, int grab, int use) override;
67
68 void cancel_sentence() override;
69
70 void freshen_sentence() override;
71
72 bool set_interface_palette(RGB8 *myPalette) override;
73
74 void track_hotspots_refresh() override;
75
76 bool eventHandler(void *bufferPtr, int32 eventType, int32 event, int32 x, int32 y, bool *z) override;
77
78 void show() override;
79
80 void refresh_right_arrow();
81 void refresh_left_arrow();
82
83 void l_cb();
84 void u_cb();
85 void t_cb();
86 void a_cb();
87};
88
89} // namespace Interface
90} // namespace Burger
91} // namespace M4
92
93#endif
Definition: inventory.h:50
Definition: gui_cheapo.h:77
Definition: gui_cheapo.h:135
Definition: gui_cheapo.h:62
Definition: adv_interface.h:32
Definition: database.h:28
Definition: interface.h:34
Definition: adv_hotspot.h:30
Definition: m4_types.h:78