partway through some documentation and bug fixing
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user