Did this work?
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user