ScummVM API documentation
TraitButton.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_TRAITBUTTON_H
32
#define CRAB_TRAITBUTTON_H
33
34
#include "crab/people/trait.h"
35
#include "crab/ui/StateButton.h"
36
37
namespace
Crab {
38
39
namespace
pyrodactyl {
40
namespace
ui {
41
class
TraitButton
:
public
StateButton
{
42
// The offset for drawing the trait image
43
Vector2i
_offset;
44
45
// The trait image
46
ImageKey _traitImg;
47
48
public
:
49
TraitButton
() {
50
_traitImg = 0;
51
}
52
53
~TraitButton
() {}
54
55
void
init(
const
TraitButton
&ref,
const
int
&xOffset = 0,
const
int
&yOffset = 0);
56
void
load(rapidxml::xml_node<char> *node,
const
bool
&echo =
true
);
57
58
void
draw(
const
int
&xOffset = 0,
const
int
&yOffset = 0,
Rect
*clip =
nullptr
);
59
60
void
cache(
const
pyrodactyl::people::Trait
&trait);
61
void
empty();
62
};
63
}
// End of namespace ui
64
}
// End of namespace pyrodactyl
65
66
}
// End of namespace Crab
67
68
#endif
// CRAB_TRAITBUTTON_H
Crab::Vector2D< int >
Crab::pyrodactyl::ui::StateButton
Definition:
StateButton.h:66
Crab::pyrodactyl::ui::TraitButton
Definition:
TraitButton.h:41
Crab::Rect
Definition:
Rectangle.h:42
Crab::pyrodactyl::people::Trait
Definition:
trait.h:40
engines
crab
ui
TraitButton.h
Generated on Sat Oct 24 2026 09:16:42 for ScummVM API documentation by
1.9.4