about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-21 14:22:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-21 14:22:34 -0700
commit9a18b09de34c9c260c77abdfcf7f81b898aad6ff (patch)
treea4976d091523d81afa67f0023b3a514eb7591cbe
parenta70d9a81dcb7c1b2d374504fcf4df238eeb3be5d (diff)
downloadlines.love-9a18b09de34c9c260c77abdfcf7f81b898aad6ff.tar.gz
bugfix: escape key to hide online help
-rw-r--r--drawing.lua6
-rw-r--r--main.lua6
2 files changed, 6 insertions, 6 deletions
diff --git a/drawing.lua b/drawing.lua
index de311e1..3bc879e 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -524,12 +524,6 @@ function Drawing.keychord_pressed(chord)
     if drawing then
       drawing.show_help = true
     end
-  elseif chord == 'escape' and not love.mouse.isDown('1') then
-    for _,line in ipairs(Lines) do
-      if line.mode == 'drawing' then
-        line.show_help = false
-      end
-    end
   end
 end
 
diff --git a/main.lua b/main.lua
index ae6f0b2..668ec0f 100644
--- a/main.lua
+++ b/main.lua
@@ -186,6 +186,12 @@ function keychord_pressed(chord)
     if drawing then
       drawing.pending = {}
     end
+  elseif chord == 'escape' and not love.mouse.isDown('1') then
+    for _,line in ipairs(Lines) do
+      if line.mode == 'drawing' then
+        line.show_help = false
+      end
+    end
   elseif Current_drawing_mode == 'name' then
     if chord == 'return' then
       Current_drawing_mode = Previous_drawing_mode