Started making Input framebased and added KeyCodes

This commit is contained in:
Simon Lübeß
2020-11-14 15:09:59 +01:00
parent 356011119b
commit 696961e46c
9 changed files with 221 additions and 23 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ namespace GlitchyEngine.ImGui
dispatcher.Dispatch<KeyPressedEvent>(scope (e) =>
{
ref ImGui.IO io = ref ImGui.GetIO();
io.KeysDown[e.KeyCode] = true;
io.KeysDown[(int32)e.KeyCode] = true;
io.KeyCtrl = io.KeysDown[VK_CONTROL];
io.KeyShift = io.KeysDown[VK_SHIFT];
@@ -138,7 +138,7 @@ namespace GlitchyEngine.ImGui
dispatcher.Dispatch<KeyReleasedEvent>(scope (e) =>
{
ref ImGui.IO io = ref ImGui.GetIO();
io.KeysDown[e.KeyCode] = false;
io.KeysDown[(int32)e.KeyCode] = false;
io.KeyCtrl = io.KeysDown[VK_CONTROL];
io.KeyShift = io.KeysDown[VK_SHIFT];