More work on the event system, sf::Events are completely wrapped now.

This commit is contained in:
MitchellHansen
2017-01-14 13:49:56 -08:00
parent 36851ad011
commit 0e1e9af37c
10 changed files with 195 additions and 255 deletions

View File

@@ -36,6 +36,7 @@
#include <Camera.h>
#include "Software_Caster.h"
#include "Input.h"
#include "Pub_Sub.h"
const int WINDOW_X = 1920;
@@ -147,12 +148,13 @@ int main() {
Input input_handler;
input_handler.subscribe(camera, SfEventPublisher::Event_Class::KeyEvent);
input_handler.subscribe(camera, vr::Event::EventType::KeyPressed);
window.setKeyRepeatEnabled(false);
while (window.isOpen()) {
input_handler.consume_events(&window);
input_handler.consume_sf_events(&window);
input_handler.set_flags();
// Poll for events from the user
sf::Event event;