-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaption.h
More file actions
52 lines (34 loc) · 889 Bytes
/
Caption.h
File metadata and controls
52 lines (34 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
namespace gui
{
class Caption
{
private:
// Variables:
sf::RectangleShape back;
sf::Text text;
bool shown;
// private: Functions:
void initVariables();
public:
// Constructors and Destructor:
Caption(sf::Font& font, sf::Color text_color, const std::string str);
~Caption();
// Modifiers:
void setSize(sf::Vector2f size);
void setSize(const float x, const float y);
void setPosition(sf::Vector2f position);
void setPosition(const float x, const float y);
void setBackColor(sf::Color color);
void setTextColor(sf::Color color);
void setString(const std::string str);
void setTexture(sf::Texture& texture);
// Functions:
void show();
void hide();
void updatePosition(sf::Vector2f position);
void updatePosition(sf::Vector2i position);
void update(const float& dt);
void render(sf::RenderTarget* target);
};
}