blob: 69367004576add8118dd2ec453cddb38aff96d86 (
plain)
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
|
#ifndef STAR_INTERFACE_CURSOR_HPP
#define STAR_INTERFACE_CURSOR_HPP
#include "StarJson.hpp"
#include "StarAnimation.hpp"
namespace Star {
class InterfaceCursor {
public:
InterfaceCursor();
// Sets the cursor to the default defined in interface.config
void resetCursor();
// Sets the cursor config to the given config IF the config is different than
// the current one. Expects a full asset path to the cursor config.
void setCursor(String const& configFile);
Drawable drawable() const;
Vec2I size() const;
Vec2I offset() const;
unsigned int scale(unsigned int interfaceScale = 0) const;
void update(float dt);
private:
String m_configFile;
Vec2I m_offset;
Vec2I m_size;
unsigned int m_scale;
MVariant<String, Animation> m_drawable;
};
}
#endif
|