diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-19 05:44:57 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-19 05:44:57 -0700 |
commit | 35d14c8aff021923571a3e44774340fa71a0f0ee (patch) | |
tree | 4873bf1405e666ce264f870fb576015ebd9b8b43 | |
parent | d482694a2a431352a69c2b7879ed2b685a6c6fb4 (diff) | |
download | text.love-35d14c8aff021923571a3e44774340fa71a0f0ee.tar.gz |
delete another arg that can be deduced
-rw-r--r-- | main.lua | 2 | ||||
-rw-r--r-- | text.lua | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/main.lua b/main.lua index bb00148..5ba82fa 100644 --- a/main.lua +++ b/main.lua @@ -130,7 +130,7 @@ function love.draw() y = y+Drawing.pixels(line.h) Drawing.draw(line) else - Text.draw(line, line_index, Cursor_line, y, Cursor_pos) + Text.draw(line, line_index, Cursor_line, Cursor_pos) end end end diff --git a/text.lua b/text.lua index 134d7c1..a2cfecb 100644 --- a/text.lua +++ b/text.lua @@ -3,13 +3,13 @@ Text = {} local utf8 = require 'utf8' -function Text.draw(line, line_index, cursor_line, y, cursor_pos) +function Text.draw(line, line_index, cursor_line, cursor_pos) love.graphics.setColor(0,0,0) local love_text = love.graphics.newText(love.graphics.getFont(), line.data) - love.graphics.draw(love_text, 25,y, 0, Zoom) + love.graphics.draw(love_text, 25,line.y, 0, Zoom) if line_index == cursor_line then -- cursor - love.graphics.print('_', Text.cursor_x(line.data, cursor_pos), y+6) -- drop the cursor down a bit to account for the increased font size + love.graphics.print('_', Text.cursor_x(line.data, cursor_pos), line.y+6) -- drop the cursor down a bit to account for the increased font size end end |