about summary refs log tree commit diff stats
path: root/help.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-18 17:01:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-18 17:01:44 -0700
commit8d4d00d1e19c327ba714b4a872543dfa5260f5b7 (patch)
tree5e34bd66b13d34a47bdb41844d13f557e978ec5a /help.lua
parent2a26a260bbf20d8dfdf6797f7278243b757c1029 (diff)
downloadtext.love-8d4d00d1e19c327ba714b4a872543dfa5260f5b7.tar.gz
fix help for rectangles and squares
Thanks John Blommers (https://github.com/akkartik/lines.love/issues/1#issuecomment-1159582457)
Diffstat (limited to 'help.lua')
-rw-r--r--help.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/help.lua b/help.lua
index 94acbab..1316304 100644
--- a/help.lua
+++ b/help.lua
@@ -76,6 +76,26 @@ function draw_help_with_mouse_pressed(drawing)
     y = y + Line_height
     love.graphics.print("* Press 'p' to add a vertex to the polygon", Margin_left+30,y)
     y = y + Line_height
+  elseif Current_drawing_mode == 'rectangle' then
+    if #drawing.pending.vertices < 2 then
+      love.graphics.print("* Press 'p' to add a vertex to the rectangle", Margin_left+30,y)
+      y = y + Line_height
+    else
+      love.graphics.print('* Release the mouse button to finish drawing the rectangle', Margin_left+30,y)
+      y = y + Line_height
+      love.graphics.print("* Press 'p' to replace the second vertext of the rectangle", Margin_left+30,y)
+      y = y + Line_height
+    end
+  elseif Current_drawing_mode == 'square' then
+    if #drawing.pending.vertices < 2 then
+      love.graphics.print("* Press 'p' to add a vertex to the square", Margin_left+30,y)
+      y = y + Line_height
+    else
+      love.graphics.print('* Release the mouse button to finish drawing the square', Margin_left+30,y)
+      y = y + Line_height
+      love.graphics.print("* Press 'p' to replace the second vertext of the square", Margin_left+30,y)
+      y = y + Line_height
+    end
   end
   love.graphics.print("* Press 'esc' then release the mouse button to cancel the current shape", Margin_left+30,y)
   y = y + Line_height