We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17872c4 commit eb6fff8Copy full SHA for eb6fff8
1 file changed
src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs
@@ -38,7 +38,8 @@ public class ImGuiRenderer
38
private int _scrollWheelValue;
39
private int _horizontalScrollWheelValue;
40
private readonly float WHEEL_DELTA = 120;
41
- private Array _allKeys = Enum.GetValues(typeof(Keys));
+ private Keys[] _allKeys = Enum.GetValues<Keys>();
42
+
43
public ImGuiRenderer(Game game)
44
{
45
var context = ImGui.CreateContext();
@@ -209,9 +210,9 @@ protected virtual void UpdateInput()
209
210
211
foreach (var key in _allKeys)
212
- if (TryMapKeys((Keys)key, out ImGuiKey imguikey))
213
+ if (TryMapKeys(key, out ImGuiKey imguikey))
214
- io.AddKeyEvent(imguikey, keyboard.IsKeyDown((Keys)key));
215
+ io.AddKeyEvent(imguikey, keyboard.IsKeyDown(key));
216
}
217
218
0 commit comments