diff options
Diffstat (limited to 'help.lua')
-rw-r--r-- | help.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/help.lua b/help.lua index 6f8633b..cc7a0c9 100644 --- a/help.lua +++ b/help.lua @@ -1,8 +1,8 @@ function draw_help_without_mouse_pressed(State, drawing_index) local drawing = State.lines[drawing_index] - local line_cache = State.line_cache[drawing_index] + local starty = Text.starty(State, drawing_index) App.color(Help_color) - local y = line_cache.starty+10 + local y = starty+10 love.graphics.print("Things you can do:", State.left+30,y) y = y + State.line_height love.graphics.print("* Press the mouse button to start drawing a "..current_shape(State), State.left+30,y) @@ -48,14 +48,14 @@ function draw_help_without_mouse_pressed(State, drawing_index) love.graphics.print("Press 'esc' now to hide this message", State.left+30,y) y = y + State.line_height App.color(Help_background_color) - love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty)) + love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty)) end function draw_help_with_mouse_pressed(State, drawing_index) local drawing = State.lines[drawing_index] - local line_cache = State.line_cache[drawing_index] + local starty = Text.starty(State, drawing_index) App.color(Help_color) - local y = line_cache.starty+10 + local y = starty+10 love.graphics.print("You're currently drawing a "..current_shape(State, drawing.pending), State.left+30,y) y = y + State.line_height love.graphics.print('Things you can do now:', State.left+30,y) @@ -129,7 +129,7 @@ function draw_help_with_mouse_pressed(State, drawing_index) y = y + State.line_height end App.color(Help_background_color) - love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty)) + love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty)) end function current_shape(State, shape) |