about summary refs log tree commit diff stats
path: root/main.lua
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 /main.lua
parenta70d9a81dcb7c1b2d374504fcf4df238eeb3be5d (diff)
downloadtext.love-9a18b09de34c9c260c77abdfcf7f81b898aad6ff.tar.gz
bugfix: escape key to hide online help
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 6 insertions, 0 deletions
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