-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrawCursor.h
58 lines (38 loc) · 1.08 KB
/
DrawCursor.h
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
52
53
54
55
56
57
58
#pragma once
#include <SFML/Graphics.hpp>
#include <algorithm>
#include <vector>
#include <map>
#define WINDOW_X_SIZE_ VideoMode::getDesktopMode().width
#define WINDOW_Y_SIZE_ VideoMode::getDesktopMode().height
class DrawCursor
{
protected:
bool m_visible;
int m_thickness;
sf::Color m_color;
sf::Vector2f m_coord;
float m_rotation;
sf::Vector2f m_originCoord;
float m_originRotation;
public:
static float simplifyAngle(float angle);
DrawCursor();
bool isVisible() const;
int getThickness() const;
sf::Color getColor() const;
sf::Vector2f getCoord() const;
float getRotation() const;
float getOriginRot() const;
sf::Vector2f getOriginCoord() const;
void setVisible(bool visible);
void setThickness(int thickness);
void setColor(sf::Color color);
void setCoord(sf::Vector2f coord);
void setCoordX(float xAxis);
void setCoordY(float yAxis);
void setRotation(float rotation);
void setOrigin(sf::Vector2f coord, float rotation);
void applyOrigin();
void drawCursor(sf::RenderWindow& window) const;
};