update stale source X-(
[?]
Mar 26, 2023, 4:55 PM
LIKTH6HMT2XAWJX6WM2ZYUUVDLN2H6SLW42GSRNF3ZUYATSJ2LDACDependencies
- [2]
IX5YTLSVstate validation in source editor as well - [3]
LDFXFRUObring a few things in sync between run and source - [4]
G54H3YG2get rid of all bifold text - [5]
2CK5QI7Wmake love event names consistent - [6]
KYNGDE2Cconsistent names in a few more places - [7]
OI4FPFINsupport drawings in the source editor - [8]
KKMFQDR4editing source code from within the app
Change contents
- edit in source_text.lua at line 181
assert(State.lines[State.cursor1.line].mode == 'text') - replacement in source_edit.lua at line 126
return loc1.line > #State.linesor loc1.pos > #State.lines[loc1.line].dataif loc1.line > #State.lines then return true endlocal l = State.lines[loc1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn loc1.pos > #State.lines[loc1.line].data - replacement in source_edit.lua at line 174
button(State, 'draw', {x=4,y=y+4, w=12,h=12, color={1,1,0},button(State, 'draw', {x=State.left-Margin_left+4, y=y+4, w=12,h=12, color={1,1,0}, - replacement in source_edit.lua at line 230
--? print('press', State.selection1.line, State.selection1.pos)--? print('press', State.cursor1.line) - replacement in source_edit.lua at line 273
--? print('release')--? print('release', State.cursor1.line) - edit in source_edit.lua at line 325
--? print('text input', t) - replacement in source_edit.lua at line 330
elseif State.current_drawing_mode == 'name' thenelseif State.lines.current_drawing and State.current_drawing_mode == 'name' then - replacement in source_edit.lua at line 483
elseif State.current_drawing_mode == 'name' thenelseif State.lines.current_drawing and State.current_drawing_mode == 'name' then - replacement in source_edit.lua at line 496
local byte_offset = Text.offset(p.name, len-1)if len == 1 then byte_offset = 0 endp.name = string.sub(p.name, 1, byte_offset)record_undo_event(State, {before=before, after=snapshot(State, State.lines.current_drawing_index)})if len > 0 thenlocal byte_offset = Text.offset(p.name, len-1)if len == 1 then byte_offset = 0 endp.name = string.sub(p.name, 1, byte_offset)record_undo_event(State, {before=before, after=snapshot(State, State.lines.current_drawing_index)})end