ScummVM API documentation
StatDrawHelper.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
/*
23
* This code is based on the CRAB engine
24
*
25
* Copyright (c) Arvind Raja Yadav
26
*
27
* Licensed under MIT
28
*
29
*/
30
31
#ifndef CRAB_STATDRAWHELPER_H
32
#define CRAB_STATDRAWHELPER_H
33
34
#include "crab/people/person.h"
35
#include "crab/ui/TextData.h"
36
37
namespace
Crab
{
38
39
namespace
pyrodactyl {
40
namespace
stat {
41
struct
StatInfo
{
42
// Used to draw stat value and description
43
pyrodactyl::ui::TextData
_desc;
44
Common::String
_text;
45
46
Rect
_dim;
47
ImageKey _full, _empty;
48
bool
_active;
49
50
StatInfo
() {
51
_active =
false
;
52
_full = 0;
53
_empty = 0;
54
}
55
56
void
load(rapidxml::xml_node<char> *node);
57
void
draw(
const
int
&val,
const
int
&max);
58
};
59
60
class
StatDrawHelper
{
61
StatInfo
_info[STAT_TOTAL];
62
63
public
:
64
StatDrawHelper
() {}
65
~
StatDrawHelper
() {}
66
67
void
load(rapidxml::xml_node<char> *node);
68
void
drawInfo(
const
pyrodactyl::people::Person
&obj);
69
70
const
Common::String
&name(
const
StatType &type) {
71
return
_info[type]._text;
72
}
73
};
74
}
// End of namespace stat
75
}
// End of namespace pyrodactyl
76
77
}
// End of namespace Crab
78
79
#endif // CRAB_STATDRAWHELPER_H
Common::String
Definition:
str.h:59
Crab::pyrodactyl::stat::StatInfo
Definition:
StatDrawHelper.h:41
Crab::Rect
Definition:
Rectangle.h:42
Crab::pyrodactyl::stat::StatDrawHelper
Definition:
StatDrawHelper.h:60
Crab::pyrodactyl::people::Person
Definition:
person.h:43
Crab::pyrodactyl::ui::TextData
Definition:
TextData.h:41
Crab
Definition:
moveeffect.h:37
engines
crab
stat
StatDrawHelper.h
Generated on Sun Dec 22 2024 09:10:03 for ScummVM API documentation by
1.8.13