partway through some documentation and bug fixing

This commit is contained in:
2018-02-17 01:08:31 -08:00
parent 176d9f7a54
commit 51be54c964
11 changed files with 146 additions and 38 deletions

View File

@@ -7,6 +7,22 @@
#include "Gui.h"
#include <string>
/**
*
* Input
*
* For each frame the Application must call
*
* consume_sf_events(*window)
* handle_held_keys()
* dispatch_events()
*
* which will pull all the events from the sfml event queue, transpose them over
* to vr:events, compare to the last frame and create held key events for keys held
* for longer than one frame, and finally dispatch the events to the relevent VrEventListener's
*
*/
class Input : public VrEventPublisher, private Gui{
public:
@@ -14,9 +30,6 @@ public:
Input();
~Input();
// 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_sf_events(sf::RenderWindow *window);
void consume_vr_events();
@@ -33,7 +46,8 @@ private:
std::vector<sf::Keyboard::Key> held_keys;
std::vector<sf::Mouse::Button> held_mouse_buttons;
// TODO: What the hell was I using these for?
std::vector<bool> keyboard_flags;
std::vector<bool> mouse_flags;