Added ImGui

This commit is contained in:
Simon Lübeß
2020-11-12 23:25:48 +01:00
parent 6e71eeea25
commit 4b877af226
17 changed files with 524 additions and 44 deletions
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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
}
+25
View File
@@ -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);
}
}
}