Adding a method of rendering GUI's that avoid the whole throwing raw

data around everywhere thing I had going on before
This commit is contained in:
MitchellHansen
2017-09-27 23:36:20 -07:00
parent a6e18bbb54
commit 3ff6fb0b14
11 changed files with 343 additions and 59 deletions

View File

@@ -4,9 +4,11 @@
#include "Event.hpp"
#include <memory>
#include "Pub_Sub.h"
#include "Gui.h"
#include <string>
class Input : public VrEventPublisher {
class Input : public VrEventPublisher, private Gui{
public:
Input();
@@ -21,6 +23,10 @@ public:
void handle_held_keys();
void dispatch_events();
virtual void render_gui() override;
virtual void update_gui() override;
private:
void transpose_sf_events(std::list<sf::Event> event_queue);
@@ -33,6 +39,8 @@ private:
private:
static const std::vector<std::string> key_strings;
std::list<std::unique_ptr<vr::Event>> event_queue;
};