ScummVM API documentation
user_interface.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_USER_INTERFACE_H
23
#define TSAGE_USER_INTERFACE_H
24
25
#include "common/scummsys.h"
26
#include "tsage/core.h"
27
#include "tsage/graphics.h"
28
#include "tsage/sound.h"
29
30
namespace
TsAGE
{
31
32
class
StripProxy
:
public
EventHandler
{
33
public
:
34
void
process(
Event
&event)
override
;
35
};
36
37
class
UIElement
:
public
BackgroundSceneObject
{
38
public
:
39
bool
_enabled;
40
int
_frameNum;
41
42
Common::String
getClassName()
override
{
return
"UIElement"
; }
43
void
synchronize(
Serializer
&s)
override
;
44
45
void
setup(
int
visage,
int
stripNum,
int
frameNum,
int
posX,
int
posY,
int
priority);
46
void
setEnabled(
bool
flag);
47
};
48
49
// This class implements the Question mark button
50
class
UIQuestion
:
public
UIElement
{
51
private
:
52
void
showDescription(CursorType item);
53
void
showItem(
int
resNum,
int
rlbNum,
int
frameNum);
54
public
:
55
void
process(
Event
&event)
override
;
56
void
setEnabled(
bool
flag);
57
};
58
59
// This class implements the score counter
60
class
UIScore
:
public
UIElement
{
61
private
:
62
void
showDescription(
int
lineNum);
63
public
:
64
UIElement
_digit3, _digit2, _digit1, _digit0;
65
66
void
postInit(
SceneObjectList
*OwnerList = NULL)
override
;
67
void
draw()
override
;
68
69
void
updateScore();
70
};
71
72
class
UIInventorySlot
:
public
UIElement
{
73
public
:
74
int
_objIndex;
75
InvObject
*_object;
76
77
UIInventorySlot
();
78
Common::String
getClassName()
override
{
return
"UIInventorySlot"
; }
79
void
synchronize(
Serializer
&s)
override
;
80
void
process(
Event
&event)
override
;
81
};
82
83
class
UIInventoryScroll
:
public
UIElement
{
84
private
:
85
void
toggle(
bool
pressed);
86
public
:
87
bool
_isLeft;
88
89
UIInventoryScroll
();
90
Common::String
getClassName()
override
{
return
"UIInventoryScroll"
; }
91
void
synchronize(
Serializer
&s)
override
;
92
void
process(
Event
&event)
override
;
93
};
94
95
class
UICollection
:
public
EventHandler
{
96
private
:
97
void
r2rDrawFrame();
98
protected
:
99
void
erase();
100
public
:
101
Common::Point
_position;
102
Rect
_bounds;
103
bool
_visible;
104
bool
_clearScreen;
105
bool
_cursorChanged;
106
Common::Array<UIElement *>
_objList;
107
108
UICollection
();
109
void
setup(
const
Common::Point
&pt);
110
void
hide();
111
void
show();
112
void
resetClear();
113
void
draw();
114
};
115
116
class
UIElements
:
public
UICollection
{
117
private
:
118
void
add(
UIElement
*obj);
119
void
updateInvList();
120
public
:
121
UIElement
_background;
122
UIQuestion
_question;
123
UIScore
_score;
124
UIInventorySlot
_slot1, _slot2, _slot3, _slot4;
125
UIInventoryScroll
_scrollLeft, _scrollRight;
126
ASound
_sound;
127
int
_slotStart, _scoreValue;
128
bool
_active;
129
Common::Array<int>
_itemList;
130
Visage
_cursorVisage;
131
UIElement
_character;
132
133
UIElements
();
134
Common::String
getClassName()
override
{
return
"UIElements"
; }
135
void
synchronize(
Serializer
&s)
override
;
136
void
postInit(
SceneObjectList
*OwnerList = NULL)
override
{
error
(
"Wrong init() called"
); }
137
void
process(
Event
&event)
override
;
138
139
void
setup(
const
Common::Point
&pt);
140
void
updateInventory(
int
objectNumber = 0);
141
void
addScore(
int
amount);
142
void
scrollInventory(
bool
isLeft);
143
144
static
void
loadNotifierProc(
bool
postFlag);
145
};
146
147
}
// End of namespace TsAGE
148
149
#endif
TsAGE::UIElement
Definition:
user_interface.h:37
Common::String
Definition:
str.h:59
TsAGE::EventHandler
Definition:
core.h:115
TsAGE::SceneObjectList
Definition:
core.h:736
Common::Array
Definition:
array.h:52
TsAGE::StripProxy
Definition:
user_interface.h:32
TsAGE::ASound
Definition:
sound.h:366
TsAGE::UIInventoryScroll
Definition:
user_interface.h:83
TsAGE::UIScore
Definition:
user_interface.h:60
TsAGE::Visage
Definition:
core.h:472
TsAGE::BackgroundSceneObject
Definition:
core.h:614
TsAGE::InvObject
Definition:
core.h:47
TsAGE::UIElements
Definition:
user_interface.h:116
Common::Point
Definition:
rect.h:45
TsAGE::Event
Definition:
events.h:47
TsAGE
Definition:
blueforce_dialogs.h:30
error
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
TsAGE::Serializer
Definition:
saveload.h:63
TsAGE::UIInventorySlot
Definition:
user_interface.h:72
TsAGE::Rect
Definition:
graphics.h:40
TsAGE::UICollection
Definition:
user_interface.h:95
TsAGE::UIQuestion
Definition:
user_interface.h:50
engines
tsage
user_interface.h
Generated on Thu Nov 21 2024 09:15:47 for ScummVM API documentation by
1.8.13