GlistEngine
Loading...
Searching...
No Matches
gGUIButton.h
Go to the documentation of this file.
1
/*
2
* gGUIButton.h
3
*
4
* Created on: Aug 23, 2021
5
* Author: noyan
6
*/
7
8
#ifndef UI_GGUIBUTTON_H_
9
#define UI_GGUIBUTTON_H_
10
11
#include "
gGUIControl.h
"
12
13
14
class
gGUIButton
:
public
gGUIControl
{
15
public
:
16
17
gGUIButton
();
18
virtual
~gGUIButton
();
19
20
void
setTitle
(std::string
title
);
21
void
setSize
(
int
width
,
int
height
);
22
void
setToggle
(
bool
isToggle
);
23
void
setDisabled
(
bool
isDisabled
);
24
void
setTextVisibility
(
bool
isVisible);
25
26
bool
isPressed
();
27
bool
isToggle
();
28
bool
isDisabled
();
29
bool
isTextVisible
();
30
31
void
setButtonColor
(
gColor
color);
32
void
setPressedButtonColor
(
gColor
color);
33
void
setDisabledButtonColor
(
gColor
color);
34
void
setButtonFontColor
(
gColor
color);
35
void
setPressedButtonFontColor
(
gColor
color);
36
void
setDisabledButtonFontColor
(
gColor
color);
37
gColor
*
getButtonColor
();
38
gColor
*
getPressedButtonColor
();
39
gColor
*
getDisabledButtonColor
();
40
gColor
*
getButtonFontColor
();
41
gColor
*
getPressedButtonFontColor
();
42
gColor
*
getDisabledButtonFontColor
();
43
44
void
enableBackgroundFill
(
bool
isEnabled
);
45
46
int
getButtonWidth
();
47
int
getButtonHeight
();
48
49
virtual
void
update
();
50
virtual
void
draw
();
51
52
virtual
void
mousePressed
(
int
x,
int
y,
int
button);
53
virtual
void
mouseReleased
(
int
x,
int
y,
int
button);
54
virtual
void
mouseMoved
(
int
x,
int
y);
55
virtual
void
mouseDragged
(
int
x,
int
y,
int
button);
56
virtual
void
mouseEntered
();
57
virtual
void
mouseExited
();
58
void
setButtonh
(
int
buttonh
);
59
void
setButtonw
(
int
buttonw
);
60
61
protected
:
62
bool
ispressed
;
63
bool
ishover
;
64
int
buttonw
,
buttonh
;
65
int
tx
,
ty
;
66
bool
istextvisible
;
67
bool
istoggle
;
68
bool
ispressednow
;
69
bool
isdisabled
;
70
gColor
bcolor
,
pressedbcolor
,
disabledbcolor
;
71
gColor
fcolor
,
pressedfcolor
,
disabledfcolor
;
72
gColor
hcolor
;
73
bool
fillbackground
;
74
75
void
resetTitlePosition
();
76
77
private
:
78
};
79
80
#endif
/* UI_GGUIBUTTON_H_ */
gBaseGUIObject::title
std::string title
Definition
gBaseGUIObject.h:145
gBaseGUIObject::width
int width
Definition
gBaseGUIObject.h:120
gBaseGUIObject::isEnabled
bool isEnabled()
gBaseGUIObject::height
int height
Definition
gBaseGUIObject.h:120
gColor
Definition
gColor.h:17
gGUIButton
Definition
gGUIButton.h:14
gGUIButton::setPressedButtonColor
void setPressedButtonColor(gColor color)
gGUIButton::buttonh
int buttonh
Definition
gGUIButton.h:64
gGUIButton::getButtonHeight
int getButtonHeight()
gGUIButton::pressedfcolor
gColor pressedfcolor
Definition
gGUIButton.h:71
gGUIButton::getDisabledButtonFontColor
gColor * getDisabledButtonFontColor()
gGUIButton::mouseDragged
virtual void mouseDragged(int x, int y, int button)
gGUIButton::disabledbcolor
gColor disabledbcolor
Definition
gGUIButton.h:70
gGUIButton::isdisabled
bool isdisabled
Definition
gGUIButton.h:69
gGUIButton::buttonw
int buttonw
Definition
gGUIButton.h:64
gGUIButton::setToggle
void setToggle(bool isToggle)
gGUIButton::getPressedButtonFontColor
gColor * getPressedButtonFontColor()
gGUIButton::mousePressed
virtual void mousePressed(int x, int y, int button)
gGUIButton::istoggle
bool istoggle
Definition
gGUIButton.h:67
gGUIButton::setDisabledButtonFontColor
void setDisabledButtonFontColor(gColor color)
gGUIButton::enableBackgroundFill
void enableBackgroundFill(bool isEnabled)
gGUIButton::pressedbcolor
gColor pressedbcolor
Definition
gGUIButton.h:70
gGUIButton::setSize
void setSize(int width, int height)
gGUIButton::setButtonh
void setButtonh(int buttonh)
gGUIButton::isTextVisible
bool isTextVisible()
gGUIButton::isToggle
bool isToggle()
gGUIButton::update
virtual void update()
gGUIButton::draw
virtual void draw()
gGUIButton::mouseMoved
virtual void mouseMoved(int x, int y)
gGUIButton::setTitle
void setTitle(std::string title)
gGUIButton::getButtonWidth
int getButtonWidth()
gGUIButton::setButtonw
void setButtonw(int buttonw)
gGUIButton::gGUIButton
gGUIButton()
gGUIButton::bcolor
gColor bcolor
Definition
gGUIButton.h:70
gGUIButton::isDisabled
bool isDisabled()
gGUIButton::getPressedButtonColor
gColor * getPressedButtonColor()
gGUIButton::mouseExited
virtual void mouseExited()
gGUIButton::ispressed
bool ispressed
Definition
gGUIButton.h:62
gGUIButton::disabledfcolor
gColor disabledfcolor
Definition
gGUIButton.h:71
gGUIButton::mouseEntered
virtual void mouseEntered()
gGUIButton::ishover
bool ishover
Definition
gGUIButton.h:63
gGUIButton::ispressednow
bool ispressednow
Definition
gGUIButton.h:68
gGUIButton::isPressed
bool isPressed()
gGUIButton::hcolor
gColor hcolor
Definition
gGUIButton.h:72
gGUIButton::resetTitlePosition
void resetTitlePosition()
gGUIButton::ty
int ty
Definition
gGUIButton.h:65
gGUIButton::tx
int tx
Definition
gGUIButton.h:65
gGUIButton::getButtonColor
gColor * getButtonColor()
gGUIButton::setTextVisibility
void setTextVisibility(bool isVisible)
gGUIButton::setDisabledButtonColor
void setDisabledButtonColor(gColor color)
gGUIButton::getDisabledButtonColor
gColor * getDisabledButtonColor()
gGUIButton::~gGUIButton
virtual ~gGUIButton()
gGUIButton::istextvisible
bool istextvisible
Definition
gGUIButton.h:66
gGUIButton::setButtonFontColor
void setButtonFontColor(gColor color)
gGUIButton::fcolor
gColor fcolor
Definition
gGUIButton.h:71
gGUIButton::setButtonColor
void setButtonColor(gColor color)
gGUIButton::fillbackground
bool fillbackground
Definition
gGUIButton.h:73
gGUIButton::getButtonFontColor
gColor * getButtonFontColor()
gGUIButton::mouseReleased
virtual void mouseReleased(int x, int y, int button)
gGUIButton::setPressedButtonFontColor
void setPressedButtonFontColor(gColor color)
gGUIButton::setDisabled
void setDisabled(bool isDisabled)
gGUIControl
Definition
gGUIControl.h:29
gGUIControl.h
engine
ui
gGUIButton.h
Generated by
1.9.8