Files
Cortex_Engine/src/Engine.Core/InputEvent.cs
T

26 lines
497 B
C#

namespace Engine.Core;
/// <summary>
/// Backend-agnostic input event captured during the current frame.
/// </summary>
public readonly record struct InputEvent(
InputEventType Type,
Key Key = Key.Unknown,
bool IsRepeat = false,
int MouseButton = -1,
float WheelX = 0,
float WheelY = 0,
string? Text = null);
public enum InputEventType
{
KeyDown,
KeyUp,
TextInput,
MouseButtonDown,
MouseButtonUp,
MouseWheel,
FocusGained,
FocusLost,
}