mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added ImGui
This commit is contained in:
@@ -22,8 +22,8 @@ namespace GlitchyEngine.Events
|
||||
|
||||
public class WindowResizeEvent : Event, IEvent
|
||||
{
|
||||
public int32 _width, _height;
|
||||
public bool _isResizing;
|
||||
private int32 _width, _height;
|
||||
private bool _isResizing;
|
||||
|
||||
/// The new width of the window.
|
||||
public int32 Width = _width;
|
||||
@@ -57,8 +57,8 @@ namespace GlitchyEngine.Events
|
||||
|
||||
public class WindowMoveEvent : Event, IEvent
|
||||
{
|
||||
public int32 _x, _y;
|
||||
public bool _isMoving;
|
||||
private int32 _x, _y;
|
||||
private bool _isMoving;
|
||||
|
||||
/// The new x-coordinate of the window.
|
||||
public int32 X = _x;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace GlitchyEngine.Events
|
||||
None = 0,
|
||||
WindowClose, WindowResize, WindowFocus, WindowLostFocus, WindowMoved,
|
||||
AppTick, AppUpdate, AppRender,
|
||||
KeyPressed, KeyReleased,
|
||||
KeyPressed, KeyReleased, KeyTyped,
|
||||
MouseButtonPressed, MouseButtonReleased, MouseMoved, MouseScrolled
|
||||
}
|
||||
|
||||
|
||||
@@ -53,4 +53,29 @@ namespace GlitchyEngine.Events
|
||||
strBuffer.AppendF("KeyReleasedEvent: {}", _keyCode);
|
||||
}
|
||||
}
|
||||
|
||||
public class KeyTypedEvent : Event, IEvent
|
||||
{
|
||||
private char16 _char;
|
||||
|
||||
[Inline]
|
||||
public char16 Char => _char;
|
||||
|
||||
public override EventCategory Category => .Input | .Keyboard
|
||||
|
||||
public override EventType EventType => .KeyTyped;
|
||||
public static EventType StaticType => .KeyTyped;
|
||||
|
||||
public override StringView Name => "KeyTyped";
|
||||
|
||||
public this(char16 char)
|
||||
{
|
||||
_char = char;
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.AppendF("KeyTypedEvent: {}", _char);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user