Did a lot of boilerplate on the Event wrapper pt.2
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <list>
|
||||
#include "Pub_Sub.hpp"
|
||||
#include "Event.hpp"
|
||||
|
||||
|
||||
class Input : public SfEventPublisher {
|
||||
@@ -13,12 +14,18 @@ public:
|
||||
// Keep track of keys that are not released
|
||||
// Keep track of mouse up and downs in conjunction with dragging
|
||||
// Keep track of joystick buttons
|
||||
|
||||
void consume_events(sf::RenderWindow *window);
|
||||
void consume_sf_events(sf::RenderWindow *window);
|
||||
void consume_vr_events();
|
||||
|
||||
void set_flags();
|
||||
void dispatch_events();
|
||||
|
||||
private:
|
||||
|
||||
void transpose_sf_events(std::list<sf::Event> event_queue);
|
||||
|
||||
// Network controller class
|
||||
|
||||
std::vector<sf::Keyboard::Key> held_keys;
|
||||
std::vector<sf::Mouse::Button> held_mouse_buttons;
|
||||
|
||||
@@ -26,5 +33,7 @@ private:
|
||||
std::vector<bool> mouse_flags;
|
||||
|
||||
private:
|
||||
std::list<sf::Event> event_queue;
|
||||
|
||||
std::list<vr::Event> event_queue;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user