Level H Engine
LevelHEngine
UI
Button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include "../Maths/Vec2.h"
5
9
class
Button
10
{
11
public
:
19
Button
(std::string buttonImage, std::string
buttonHeldSprite
,
Vec2
inPos,
Vec2
inDim);
20
27
Button
(std::string buttonImage, std::string buttonHeldSprite,
Vec2
inPos);
28
32
~Button
();
33
38
bool
input
();
39
43
void
draw
();
44
45
private
:
47
std::string
buttonSprite
,
buttonHeldSprite
;
49
bool
pressed
;
51
Vec2
pos
,
dim
;
52
};
Button::pressed
bool pressed
A boolean for if the button is pressed.
Definition:
Button.h:49
Button::buttonSprite
std::string buttonSprite
The menu sprite.
Definition:
Button.h:47
Vec2
Contains the Vec2 structure with functions and overloaded operators.
Definition:
Vec2.h:8
Button::Button
Button(std::string buttonImage, std::string buttonHeldSprite, Vec2 inPos, Vec2 inDim)
Constructs the Button object.
Definition:
Button.cpp:7
Button::dim
Vec2 dim
Definition:
Button.h:51
Button::draw
void draw()
Draws the button.
Definition:
Button.cpp:50
Button::~Button
~Button()
Destructs the Button object.
Definition:
Button.cpp:24
Button::buttonHeldSprite
std::string buttonHeldSprite
Definition:
Button.h:47
Button::pos
Vec2 pos
The button position and dimensions.
Definition:
Button.h:51
Button
A State for a button.
Definition:
Button.h:9
Button::input
bool input()
Handles the Button input.
Definition:
Button.cpp:28
Generated on Mon Nov 5 2018 12:22:15 for Level H Engine by
1.8.13