always show current filename in window title

This commit is contained in:
Kartik K. Agaram 2022-05-16 18:50:32 -07:00
parent 735ad25226
commit b7b2d7d0a1
1 changed files with 3 additions and 1 deletions

View File

@ -55,13 +55,14 @@ function love.load(arg)
screenw = screenw-100
screenh = screenh-100
love.window.setMode(screenw, screenh)
love.window.setTitle("Text with Lines")
love.window.setTitle('Text with Lines')
drawingw = math.floor(screenh/2/40)*40
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
if #arg > 0 then
filename = arg[1]
end
lines = load_from_disk(filename)
love.window.setTitle('Text with Lines - '..filename)
end
function love.filedropped(file)
@ -69,6 +70,7 @@ function love.filedropped(file)
file:open('r')
lines = load_from_file(file)
file:close()
love.window.setTitle('Text with Lines - '..filename)
end
function love.draw()