about summary refs log tree commit diff stats
path: root/drawing.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-18 17:22:04 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-18 17:42:08 -0700
commitf91e5201241451fe5f9712a97c288f1534e74b11 (patch)
treee5d6618d03e6a49bfbd120a536b4aba6dc7361cc /drawing.lua
parente27165cb9f0f0635f0290cb345442292faeba7fd (diff)
downloadtext.love-f91e5201241451fe5f9712a97c288f1534e74b11.tar.gz
scroll past first page
Still some limitations. The text cursor has to be visible on screen, so
if you have a long series of drawings without intervening lines of text
you won't be able to scroll through them all.
Diffstat (limited to 'drawing.lua')
-rw-r--r--drawing.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/drawing.lua b/drawing.lua
index be4952e..7047893 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -177,6 +177,7 @@ end
 
 
 function Drawing.in_drawing(drawing, x,y)
+  if drawing.y == nil then return false end  -- outside current page
   return y >= drawing.y and y < drawing.y + Drawing.pixels(drawing.h) and x >= 16 and x < 16+Drawing_width
 end