-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFadeScreen.h
More file actions
50 lines (34 loc) · 698 Bytes
/
FadeScreen.h
File metadata and controls
50 lines (34 loc) · 698 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
#pragma once
namespace gui
{
class FadeScreen
{
private:
// Variables:
sf::RectangleShape shape;
sf::Color color;
float alphaMultiplier;
float speed;
bool fade;
bool covered;
// Functions:
void initVariables();
public:
// Constructors and Destructor:
FadeScreen();
~FadeScreen();
// Accessors:
const bool isVisible() const;
const bool isOpaque() const;
// Modifiers:
void setSize(const float x, const float y);
void setSize(sf::Vector2f size);
void setColor(sf::Color color);
void setFadeSpeed(const float speed);
// Fucntions:
void fadeIn();
void fadeOut();
void update(const float& dt);
void render(sf::RenderTarget* target);
};
}