GUI
include
Button.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 by Maciej Wiecierzewski
3
*/
4
5
#ifndef BUTTON_H
6
#define BUTTON_H
7
8
#include <string>
9
10
#include "
Renderer.h
"
11
#include "
Widget.h
"
12
13
namespace
gui
14
{
15
16
class
GUISystem
;
17
19
20
class
Button
:
public
Widget
21
{
22
public
:
23
Button
(
GUISystem
*
guiSystem
,
int
x
,
int
y
,
int
w
,
int
h
, std::string
text
);
24
virtual
~Button
() {};
25
26
virtual
void
render
(
Renderer
*renderer);
27
void
stateChange
(
Widget::State
state
);
28
void
setText
(
const
std::string &text);
29
30
Color
upStateColor
;
31
Color
hoverStateColor
;
32
Color
downStateColor
;
33
Color
textColor
;
34
35
protected
:
36
37
private
:
38
std::string
text
;
39
};
40
41
}
42
43
#endif // BUTTON_H
Generated on Sat Feb 11 2017 20:22:31 for GUI by
1.8.13