about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-11 23:03:27 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-11 23:18:26 -0700
commit3850fbac35bb5679ed58753491db4a4cd2267a73 (patch)
treea296ccc5d26f507d38fe4771c453ae4a2ef012c2 /text.lua
parent2e3a85d94be44bfb53554d0e7ba8a36f8e91c605 (diff)
downloadlines.love-3850fbac35bb5679ed58753491db4a4cd2267a73.tar.gz
make colors easier to edit
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/text.lua b/text.lua
index 9926269..c61a488 100644
--- a/text.lua
+++ b/text.lua
@@ -11,7 +11,7 @@ require 'text_tests'
 --  position of start of final screen line drawn
 function Text.draw(line, line_index, top, left, right)
 --?   print('text.draw', line_index)
-  love.graphics.setColor(0,0,0)
+  App.color(Text_color)
   -- wrap long lines
   local x = left
   local y = top
@@ -59,7 +59,7 @@ function Text.draw(line, line_index, top, left, right)
         if Search_term then
           if Lines[Cursor1.line].data:sub(Cursor1.pos, Cursor1.pos+utf8.len(Search_term)-1) == Search_term then
             local lo_px = Text.draw_highlight(line, x,y, pos, Cursor1.pos, Cursor1.pos+utf8.len(Search_term))
-            love.graphics.setColor(0,0,0)
+            App.color(Text_color)
             love.graphics.print(Search_term, x+lo_px,y)
           end
         else
@@ -83,9 +83,9 @@ end
 function Text.draw_cursor(x, y)
   -- blink every 0.5s
   if math.floor(Cursor_time*2)%2 == 0 then
-    love.graphics.setColor(1,0,0)
+    App.color(Cursor_color)
     love.graphics.rectangle('fill', x,y, 3,Line_height)
-    love.graphics.setColor(0,0,0)
+    App.color(Text_color)
   end
   Cursor_x = x
   Cursor_y = y+Line_height