Mercurial > games > semicongine
diff tests/test_panel.nim @ 1021:73b572f82a1f
add: bases for a better input-system
author | sam <sam@basx.dev> |
---|---|
date | Thu, 09 May 2024 23:02:35 +0700 |
parents | f9d25bc331b3 |
children | 74957cbf589b |
line wrap: on
line diff
--- a/tests/test_panel.nim Wed May 08 15:46:47 2024 +0700 +++ b/tests/test_panel.nim Thu May 09 23:02:35 2024 +0700 @@ -64,23 +64,23 @@ scene.add origin engine.loadScene(scene) - while engine.updateInputs() == Running and not engine.keyIsDown(Escape): - if engine.keyWasPressed(F1): + while engine.updateInputs() and not keyIsDown(Escape): + if keyWasPressed(F1): button.horizontalAlignment = Left counterText.horizontalAlignment = Left - elif engine.keyWasPressed(F2): + elif keyWasPressed(F2): button.horizontalAlignment = Center counterText.horizontalAlignment = Center - elif engine.keyWasPressed(F3): + elif keyWasPressed(F3): button.horizontalAlignment = Right counterText.horizontalAlignment = Right - elif engine.keyWasPressed(F4): + elif keyWasPressed(F4): button.verticalAlignment = Top counterText.verticalAlignment = Top - elif engine.keyWasPressed(F5): + elif keyWasPressed(F5): button.verticalAlignment = Center counterText.verticalAlignment = Center - elif engine.keyWasPressed(F6): + elif keyWasPressed(F6): button.verticalAlignment = Bottom counterText.verticalAlignment = Bottom