mirror of
https://github.com/Stone-Red-Code/StoneRed.LogicSimulator.git
synced 2026-09-04 00:56:23 +02:00
Update key handling to trigger actions only on key release events
This commit is contained in:
@@ -253,12 +253,12 @@ internal class WorldScreen : SrlsScreen<Grid>
|
||||
}
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.C))
|
||||
if (keyboardState.WasKeyJustUp(Keys.C))
|
||||
{
|
||||
UnSelectLogicGate();
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.Q))
|
||||
if (keyboardState.WasKeyJustUp(Keys.Escape))
|
||||
{
|
||||
blockInput = true;
|
||||
|
||||
@@ -268,7 +268,7 @@ internal class WorldScreen : SrlsScreen<Grid>
|
||||
srls.ShowWindow(new QuickMenu(worldData));
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.Home))
|
||||
if (keyboardState.WasKeyJustUp(Keys.Home))
|
||||
{
|
||||
camera.Position = Vector2.Zero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user