diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-09 13:45:52 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-09 13:47:41 -0700 |
commit | fe170fc579cc084061f6dce70aa9b4e966148ca7 (patch) | |
tree | 3ff48d57828ec7c96c7f7ba32564fb58d625b0ca /main.lua | |
parent | 25190676ea2a7cee59c57506ccefaed82ee6fb79 (diff) | |
download | text.love-fe170fc579cc084061f6dce70aa9b4e966148ca7.tar.gz |
experiment: blinking cursor
I've tried to keep the time period of the blinking similar to my terminal. Honestly I'm no longer sure if any of my experiments are showing a statistically significant result. Let's see how it feels over a period of time.
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main.lua b/main.lua index 2812dd5..9b6fb35 100644 --- a/main.lua +++ b/main.lua @@ -82,6 +82,9 @@ Search_backup = nil -- stuff to restore when cancelling search -- resize Last_resize_time = nil +-- blinking cursor +Cursor_time = 0 + end -- App.initialize_globals function App.initialize(arg) @@ -249,6 +252,7 @@ function App.draw() end function App.update(dt) + Cursor_time = Cursor_time + dt -- some hysteresis while resizing if Last_resize_time then if love.timer.getTime() - Last_resize_time < 0.1 then |