indicate unsaved changes

This commit is contained in:
Kartik K. Agaram 2024-03-17 11:01:25 -07:00
parent 6c596c0bcd
commit 1f42711dde
1 changed files with 6 additions and 2 deletions

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)