Commits

Kévin Delbrayelle  committed 969080a

keyboard files (win32)

  • Participants
  • Parent commits a0f62a4
  • Branches input

Comments (0)

Files changed (2)

File game/inc/input/win32/keyboard.h

 
     bool is_pressed(int key);
 
+    void update() {}
+    int get_value(int index);
+
     int get_pressed_key();
     int get_key_code(int key);
     void get_key_symbol(int key, char* name);

File game/src/input/win32/keyboard.cpp

 {}
 
 
-void Keyboard::update()
+int Keyboard::get_value(int index)
 {
-    // nothing here, keymap is update by the application
+    //TODO: define what is the range of value depending on various input devices
+    return is_pressed(index) ? 1 : 0;
 }