-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathControlQualityModule.hpp
47 lines (33 loc) · 1.06 KB
/
ControlQualityModule.hpp
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
#ifndef CONTROLQUALITYMODULE_HPP
#define CONTROLQUALITYMODULE_HPP
#include "Module.hpp"
#include "GameStuff.hpp"
class ControlQualityModule : public Module {
public:
ControlQualityModule() {
in_ports.push_back(&frag);
in_ports.push_back(&bin);
frag.position = make_vector(-0.5f * size().x, 0.25f * size().y);
bin.position = make_vector(-0.5f * size().x,-0.25f * size().y);
frag() = (unsigned)-1;
bin() = (unsigned)-1;
frag.name = "frag";
bin.name = "bin";
out_ports.push_back(&value);
value.position = make_vector(0.5f * size().x, 0.0f);
value() = 0.0f;
value.name = "value";
}
virtual ~ControlQualityModule() {
}
//Item functions:
virtual Vector2f size();
virtual void draw(Box2f viewport, Box2f screen_viewport, float scale, unsigned int recurse = 0);
//Module functions:
virtual void update(float elapsed_time);
virtual bool handle_event(SDL_Event const &event, Vector2f local_mouse);
PortDataContainer< unsigned int > frag;
PortDataContainer< unsigned int > bin;
PortDataContainer< float > value;
};
#endif //CONTROLQUALITYMODULE_HPP