mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Started making Input framebased and added KeyCodes
This commit is contained in:
@@ -6,16 +6,40 @@ namespace GlitchyEngine
|
||||
{
|
||||
public static class Input
|
||||
{
|
||||
public static extern bool IsKeyPressed(int32 keycode);
|
||||
public static extern bool IsKeyReleased(int32 keycode);
|
||||
public static extern bool IsKeyToggled(int32 keycode);
|
||||
public static extern bool IsKeyPressed(Key keycode);
|
||||
public static extern bool IsKeyReleased(Key keycode);
|
||||
public static extern bool IsKeyToggled(Key keycode);
|
||||
|
||||
public static extern bool WasKeyPressed(Key keycode);
|
||||
public static extern bool WasKeyReleased(Key keycode);
|
||||
public static extern bool WasKeyToggled(Key keycode);
|
||||
|
||||
/*
|
||||
* Determines whether or not the key is being pressed down.
|
||||
* @remarks IsKeyPressing(kc) == IsKeyPressed(kc) && !IsKeyReleased(kc)
|
||||
*/
|
||||
public static extern bool IsKeyPressing(Key keycode);
|
||||
/*
|
||||
* Determines whether or not the key is being released down.
|
||||
* @remarks IsKeyReleasing(kc) == !IsKeyPressed(kc) && IsKeyReleased(kc)
|
||||
*/
|
||||
public static extern bool IsKeyReleasing(Key keycode);
|
||||
|
||||
public static extern bool IsMouseButtonPressed(MouseButton button);
|
||||
public static extern bool IsMouseButtonReleased(MouseButton button);
|
||||
|
||||
public static extern bool WasMouseButtonPressed(MouseButton button);
|
||||
public static extern bool WasMouseButtonReleased(MouseButton button);
|
||||
|
||||
public static extern int32 GetMouseX();
|
||||
public static extern int32 GetMouseY();
|
||||
|
||||
public static extern int32 GetLastMouseX();
|
||||
public static extern int32 GetLastMouseY();
|
||||
|
||||
public static extern Point GetMousePosition();
|
||||
public static extern Point GetLastMousePosition();
|
||||
|
||||
public static extern void NewFrame();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user