ScummVM API documentation
button.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 NANCY_UI_BUTTON_H
23
#define NANCY_UI_BUTTON_H
24
25
#include "engines/nancy/renderobject.h"
26
27
namespace
Nancy
{
28
29
struct
NancyInput;
30
31
namespace
UI
{
32
33
class
Button
:
public
RenderObject
{
34
public
:
35
Button
(uint16 zOrder,
Graphics::ManagedSurface
&surface,
36
const
Common::Rect
&clickSrcBounds,
37
const
Common::Rect
&destBounds,
38
const
Common::Rect
&hoverSrcBounds =
Common::Rect
(),
39
const
Common::Rect
&disabledSrcBounds =
Common::Rect
());
40
virtual
~
Button
() =
default
;
41
42
void
handleInput(
NancyInput
&input);
43
44
void
setDisabled(
bool
disabled);
45
46
Graphics::ManagedSurface
&surf;
47
Common::Rect
_clickSrc;
48
Common::Rect
_hoverSrc;
49
Common::Rect
_disabledSrc;
50
51
bool
_isClicked;
52
bool
_isDisabled;
53
};
54
55
class
Toggle
:
public
RenderObject
{
56
public
:
57
Toggle
(uint16 zOrder,
Graphics::ManagedSurface
&surface,
const
Common::Rect
&srcRect,
const
Common::Rect
&destRect);
58
virtual
~
Toggle
() =
default
;
59
60
void
handleInput(
NancyInput
&input);
61
void
setState(
bool
toggleState);
62
63
Graphics::ManagedSurface
&surf;
64
Common::Rect
_clickSrc;
65
66
bool
_stateChanged;
67
bool
_toggleState;
68
};
69
70
}
// End of namespace UI
71
}
// End of namespace Nancy
72
73
#endif // NANCY_UI_BUTTON_H
Graphics::ManagedSurface
Definition:
managed_surface.h:51
Nancy::UI::Toggle
Definition:
button.h:55
Common::Rect
Definition:
rect.h:144
Nancy::NancyInput
Definition:
input.h:41
UI
Definition:
soundequalizerpuzzle.h:27
Nancy::RenderObject
Definition:
renderobject.h:36
Nancy::UI::Button
Definition:
button.h:33
Nancy
Definition:
actionmanager.h:32
engines
nancy
ui
button.h
Generated on Sat Aug 31 2024 09:08:03 for ScummVM API documentation by
1.8.13