bugfix: escape key to hide online help

This commit is contained in:
Kartik K. Agaram 2022-05-21 14:22:34 -07:00
parent a70d9a81dc
commit 9a18b09de3
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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