diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-15 21:27:00 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-15 21:27:00 -0700 |
commit | 3be553031ea33c6b4f0f4623e954d2b5febe5e88 (patch) | |
tree | 5bb4426d35a8bd353da11caf5fd8b7c198a0e2e7 | |
parent | 5d74f9e9cd86a6ee8b51f55753f10e99025f4412 (diff) | |
download | lines.love-3be553031ea33c6b4f0f4623e954d2b5febe5e88.tar.gz |
bugfix: move mode
-rw-r--r-- | main.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main.lua b/main.lua index 11835bc..658d94d 100644 --- a/main.lua +++ b/main.lua @@ -93,7 +93,11 @@ function love.draw() if pmx > 16 and pmx < 16+drawingw and pmy > line.y and pmy < line.y+pixels(line.h) then love.graphics.setColor(0.75,0.75,0.75) love.graphics.rectangle('line', 16,line.y, drawingw,pixels(line.h)) - icon[current_mode](16+drawingw-20, line.y+4) + if icon[current_mode] then + icon[current_mode](16+drawingw-20, line.y+4) + else + icon[previous_mode](16+drawingw-20, line.y+4) + end if love.mouse.isDown('1') and love.keyboard.isDown('h') then draw_help_with_mouse_pressed(line) |