From 8dca99ccc3fe6afa8174f084729b43e78fdf334b Mon Sep 17 00:00:00 2001 From: djib Date: Mon, 2 Jan 2023 14:05:11 +0100 Subject: [PATCH] Improve input keys --- maths-attacks.p8 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/maths-attacks.p8 b/maths-attacks.p8 index e19c168..b226c9f 100644 --- a/maths-attacks.p8 +++ b/maths-attacks.p8 @@ -1,5 +1,5 @@ pico-8 cartridge // http://www.pico-8.com -version 37 +version 39 __lua__ -- maths attacks -- -- by djib -- @@ -129,20 +129,20 @@ function get_input() end end elseif btn_held(❎) then - result = "fire!" - elseif btn_pressed(🅾️) then result = "0" - elseif btn_held(🅾️) then + elseif btn_pressed(🅾️) then result = "clear!" + elseif btn_held(🅾️) then + result = "fire!" end return result end function input_matches(v) return btn(⬆️)==v.up and - btn(⬇️)==v.down and - btn(⬅️)==v.left and - btn(➡️)==v.right + btn(⬇️)==v.down and + btn(⬅️)==v.left and + btn(➡️)==v.right end function draw_keypad() @@ -165,8 +165,6 @@ function draw_keypad() ) end end --->8 - __gfx__ 66666660666666606666666066666660666666606666666066666660666666606666666066666660000000000000000000000000000000000000000000000000 67111765671177656711176567111765671717656711176567111765671117656711176567111765000000000000000000000000000000000000000000000000