add IsIdle and IsUp to Keyboard

pull/37/head
cosmonaut 2022-11-28 10:19:03 -08:00
parent d5ddd44bd3
commit bc41d2c079
1 changed files with 15 additions and 5 deletions

View File

@ -75,11 +75,6 @@ namespace MoonWorks.Input
} }
} }
public bool IsDown(KeyCode keycode)
{
return Keys[(int) keycode].IsDown;
}
public bool IsPressed(KeyCode keycode) public bool IsPressed(KeyCode keycode)
{ {
return Keys[(int) keycode].IsPressed; return Keys[(int) keycode].IsPressed;
@ -90,11 +85,26 @@ namespace MoonWorks.Input
return Keys[(int) keycode].IsHeld; return Keys[(int) keycode].IsHeld;
} }
public bool IsDown(KeyCode keycode)
{
return Keys[(int) keycode].IsDown;
}
public bool IsReleased(KeyCode keycode) public bool IsReleased(KeyCode keycode)
{ {
return Keys[(int) keycode].IsReleased; return Keys[(int) keycode].IsReleased;
} }
public bool IsIdle(KeyCode keycode)
{
return Keys[(int) keycode].IsIdle;
}
public bool IsUp(KeyCode keycode)
{
return Keys[(int) keycode].IsUp;
}
public KeyboardButton Button(KeyCode keycode) public KeyboardButton Button(KeyCode keycode)
{ {
return Keys[(int) keycode]; return Keys[(int) keycode];