experiment: blinking cursor

[?]
Jun 9, 2022, 8:45 PM
J2SVGR2EQEROXDDMYZOCELD2VDYQALGZYRSZ4WGMTACAGMRPJ7UAC

Dependencies

  • [2] K464QQR4 more defensive resize handling
  • [3] FYQQTPRP the problem is that the cursor can occlude text
  • [4] HOSPP2AN crisp font rendering
  • [5] KWOJ6XHE cut/copy selected text to clipboard
  • [6] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [7] 5DOC2CBM extract a function
  • [8] OIB2QPRC start remembering where the cursor is drawn in px
  • [9] VVAGDVCU experiment: line cursor
  • [10] CAMMFOJ4 make cursor more obvious
  • [11] EHX6Q4OJ make the cursor a little thicker
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold
  • [*] 73OCE2MC after much struggle, a brute-force undo
  • [*] AVTNUQYR basic test-enabled framework

Change contents

  • replacement in text.lua at line 88
    [4.133][3.3:40](),[3.40][4.3:57](),[4.165][4.3:57](),[4.46][4.224:256](),[4.54][4.224:256](),[4.57][4.224:256](),[4.659][4.224:256](),[4.224][4.224:256]()
    love.graphics.setColor(1,0,0, 0.8)
    love.graphics.rectangle('fill', x,y, 3,Line_height)
    love.graphics.setColor(0,0,0)
    [4.133]
    [4.1]
    -- blink every 0.5s
    if math.floor(Cursor_time*2)%2 == 0 then
    love.graphics.setColor(1,0,0)
    love.graphics.rectangle('fill', x,y, 3,Line_height)
    love.graphics.setColor(0,0,0)
    end
  • edit in main.lua at line 84
    [2.196]
    [15.8163]
    -- blinking cursor
    Cursor_time = 0
  • edit in main.lua at line 255
    [16.1398]
    [2.449]
    Cursor_time = Cursor_time + dt