Merge carousel.love

This commit is contained in:
Kartik K. Agaram 2024-03-17 11:49:27 -07:00
commit 95f34d5b68
5 changed files with 12 additions and 4 deletions

View File

@ -15,5 +15,6 @@ on.update = function(dt)
elseif Output_editor_state.scrollbar_drag then
adjust_scrollbar(Output_editor_state, App.mouse_y())
end
-- never call edit.update; autosave is flaky on mobile devices
end
end
end

View File

@ -13,8 +13,12 @@ draw_editor_border = function()
end
love.graphics.setFont(Title_font)
local tx1 = Current_pane.editor_state.left
local tx2 = tx1 + App.width(Current_pane.filename)
love.graphics.print(Current_pane.filename, tx1, y1-15+5)
local filename = Current_pane.filename
if Current_pane.editor_state.next_save then
filename = filename..' *'
end
local tx2 = tx1 + App.width(filename)
love.graphics.print(filename, tx1, y1-15+5)
love.graphics.setFont(old_font)
love.graphics.line(x1,y1, tx1-5,y1)
love.graphics.line(math.min(tx2+5,x2), y1, x2,y1)

3
0176-on.quit Normal file
View File

@ -0,0 +1,3 @@
on.quit = function()
-- never call edit.quit; autosave is flaky on mobile devices
end

View File

@ -140,7 +140,6 @@ end
function edit.update(State, dt)
if State.next_save and State.next_save < Current_time then
save_to_disk(State)
State.next_save = nil
end
end

View File

@ -41,6 +41,7 @@ function save_to_disk(State)
outfile:write('\n')
end
outfile:close()
State.next_save = nil
end
-- for tests