@@ -31,6 +31,7 @@ namespace WalrusRPG
void key_poll();
+ KeyState key_get_state(Key key);
bool key_pressed(Key key);
bool key_released(Key key);
bool key_down(Key key);
@@ -23,6 +23,11 @@ static InputMap key_map[] = {
{Key::K_START, KEY_NSPIRE_HOME}, {Key::K_SELECT, KEY_NSPIRE_ESC},
};
+KeyState INPUT::key_get_state(Key key)
+{
+ return key_states[key];
+}
+
void INPUT::key_poll()
{
for (unsigned i = 0; i < K_SIZE; i++)
@@ -32,6 +32,11 @@ InputMap key_map[] = {
{Key::K_SELECT, Keyboard::BackSpace, Keyboard::Unknown},
bool hasFocus = window.hasFocus();