about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-20 05:41:25 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-20 05:41:25 -0700
commit7fd3c92efed31a59e8e4c523f260313df348d244 (patch)
tree0645f48d787ce697434ad6680968f354e7ef8960 /text.lua
parent5f2ef2faafa19e095ec5d447d0e24f98c473d31a (diff)
downloadtext.love-7fd3c92efed31a59e8e4c523f260313df348d244.tar.gz
start remembering where the cursor is drawn in px
We'll start using this in cursor up/down motions.
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/text.lua b/text.lua
index 44abc67..f4181d8 100644
--- a/text.lua
+++ b/text.lua
@@ -52,6 +52,8 @@ function Text.draw_cursor(x, y)
   love.graphics.setColor(1,0,0)
   love.graphics.circle('fill', x,y+math.floor(15*Zoom), 2)
   love.graphics.setColor(0,0,0)
+  Cursor_x = x
+  Cursor_y = y+math.floor(15*Zoom)
 end
 
 function Text.compute_fragments(line, line_width)