aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v2.h
blob: 3fdc64e34f32ea95a2be1167d8d647d0e899508f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* 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.

 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * $URL$
 * $Id$
 *
 */

#ifndef KYRA_GUI_V2_H
#define KYRA_GUI_V2_H

#include "kyra/gui.h"

namespace Kyra {

#define GUI_V2_BUTTON(button, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t) \
	button.nextButton = 0; \
	button.index = a; \
	button.unk6 = b; \
	button.unk8 = c; \
	button.data0Val1 = d; \
	button.data1Val1 = e; \
	button.data2Val1 = f; \
	button.flags = h; \
	button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \
	button.dimTableIndex = i; \
	button.x = j; \
	button.y = k; \
	button.width = l; \
	button.height = m; \
	button.data0Val2 = n; \
	button.data0Val3 = o; \
	button.data1Val2 = p; \
	button.data1Val3 = q; \
	button.data2Val2 = r; \
	button.data2Val3 = s; \
	button.flags2 = t;

#define GUI_V2_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \
	menu.x = a; \
	menu.y = b; \
	menu.width = c; \
	menu.height = d; \
	menu.bkgdColor = e; \
	menu.color1 = f; \
	menu.color2 = g; \
	menu.menuNameId = h; \
	menu.textColor = i; \
	menu.titleX = j; \
	menu.titleY = k; \
	menu.highlightedItem = l; \
	menu.numberOfItems = m; \
	menu.scrollUpButtonX = n; \
	menu.scrollUpButtonY = o; \
	menu.scrollDownButtonX = p; \
	menu.scrollDownButtonY = q

#define GUI_V2_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \
	item.enabled = a; \
	item.itemId = b; \
	item.x = c; \
	item.y = d; \
	item.width = e; \
	item.height = f; \
	item.textColor = g; \
	item.highlightColor = h; \
	item.titleX = i; \
	item.bkgdColor = j; \
	item.color1 = k; \
	item.color2 = l; \
	item.saveSlot = m; \
	item.labelId = n; \
	item.labelX = o; \
	item.labelY = p; \
	item.unk1F = q

class KyraEngine_v2;
class Screen_v2;

class GUI_v2 : public GUI {
public:
	GUI_v2(KyraEngine_v2 *vm);

	Button *addButtonToList(Button *list, Button *newButton);

	void processButton(Button *button);
	int processButtonList(Button *button, uint16 inputFlag);

protected:
	void updateButton(Button *button);

	KyraEngine_v2 *_vm;
	Screen_v2 *_screen;

	bool _buttonListChanged;
	Button *_backUpButtonList;
	Button *_unknownButtonList;
};

} // end of namespace Kyra

#endif