Did this work?

This commit is contained in:
2017-10-05 23:30:12 -07:00
parent 2d2a854f0f
commit 58ef1da02a
19 changed files with 366 additions and 428 deletions

View File

@@ -21,7 +21,9 @@ public:
void consume_vr_events();
void handle_held_keys();
void dispatch_events();
virtual void render_gui() override;
virtual void update_gui() override;
@@ -40,10 +42,6 @@ private:
static const std::vector<std::string> key_strings;
std::list<std::unique_ptr<vr::Event>> event_queue;
protected:
virtual void generate_events() override;
};
class WindowHandler : public VrEventSubscriber {
@@ -55,13 +53,13 @@ public:
if (event.get()->type == vr::Event::Closed) {
window_ref->close();
} else if (event.get()->type == vr::Event::KeyPressed) {
vr::KeyPressed *key_event = static_cast<vr::KeyPressed*>(event.get());
if (key_event->code == sf::Keyboard::Escape) {
window_ref->close();
}
} else if (event.get()->type == vr::Event::KeyPressed) {
vr::KeyPressed *key_event = static_cast<vr::KeyPressed*>(event.get());
if (key_event->code == sf::Keyboard::Escape) {
window_ref->close();
}
}
};