up/down cursor movement
[?]
May 17, 2022, 3:26 AM
3CS5KKCIZQ6J4SBILINYZSOM6V3U2LE7YIXOZVKXXNBROF6Z6JWACDependencies
- [2]
VQFBNHU4make point near focus 'pop' - [3]
IYW7X3WLleft/right cursor movement, deleting characters - [4]
KCIM5UTVrevert: back to freehand - [5]
ZD63LJ2Tbugfix: keep the click to create a new drawing from creating a new shape in the drawing - [6]
JCSLDGAHbeginnings of support for multiple shapes - [7]
7RN3AETYbugfix: text sometimes getting colored like drawing borders - [8]
OFA3PRBSautosave on keystrokes - [9]
5TIFKJ7Shandle space key - [10]
QU7NHFOVshow cursor - [11]
6LJZN727handle chords - [12]
OTIBCAUJlove2d scaffold - [13]
O2UFJ6G3switch from freehand to just straight lines - [14]
G77XIN7Mselecting a stroke - [15]
VXORMHMEdelete experimental REPL - [16]
NCRKBTHCposition cursor more precisely - [17]
6PUNJS5Bbackspace - [18]
IFGAJAF7add a level of indirection to vertices of shapes - [19]
XX7G2FFJintermingle freehand line drawings with text
Change contents
- edit in main.lua at line 153
--? print(#line.points) - edit in main.lua at line 157
if i == cursor_line then-- cursorlove.graphics.setColor(0,0,0)local line_before_cursor = lines[cursor_line]:sub(1, cursor_pos-1)local text_before_cursor = love.graphics.newText(love.graphics.getFont(), line_before_cursor)love.graphics.print('_', 25+text_before_cursor:getWidth()*1.5, y+6) -- drop the cursor down a bit to account for the increased font sizeend - edit in main.lua at line 166
-- cursorlove.graphics.setColor(0,0,0)local line_before_cursor = lines[cursor_line]:sub(1, cursor_pos-1)local text_before_cursor = love.graphics.newText(love.graphics.getFont(), line_before_cursor)love.graphics.print('_', 25+text_before_cursor:getWidth()*1.5, y+6) -- drop the cursor down a bit to account for the increased font size - replacement in main.lua at line 513
table.insert(lines, '')table.insert(lines, cursor_line+1, '')cursor_line = cursor_line+1cursor_pos = 1 - edit in main.lua at line 542
endelseif chord == 'up' thenif cursor_line > 1 thencursor_line = cursor_line-1if cursor_pos > #lines[cursor_line] thencursor_pos = #lines[cursor_line]+1end - edit in main.lua at line 550
elseif chord == 'down' thenif cursor_line < #lines thencursor_line = cursor_line+1if cursor_pos > #lines[cursor_line] thencursor_pos = #lines[cursor_line]+1endend