always show current filename in window title
This commit is contained in:
parent
735ad25226
commit
b7b2d7d0a1
4
main.lua
4
main.lua
|
@ -55,13 +55,14 @@ function love.load(arg)
|
||||||
screenw = screenw-100
|
screenw = screenw-100
|
||||||
screenh = screenh-100
|
screenh = screenh-100
|
||||||
love.window.setMode(screenw, screenh)
|
love.window.setMode(screenw, screenh)
|
||||||
love.window.setTitle("Text with Lines")
|
love.window.setTitle('Text with Lines')
|
||||||
drawingw = math.floor(screenh/2/40)*40
|
drawingw = math.floor(screenh/2/40)*40
|
||||||
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
|
love.keyboard.setTextInput(true) -- bring up keyboard on touch screen
|
||||||
if #arg > 0 then
|
if #arg > 0 then
|
||||||
filename = arg[1]
|
filename = arg[1]
|
||||||
end
|
end
|
||||||
lines = load_from_disk(filename)
|
lines = load_from_disk(filename)
|
||||||
|
love.window.setTitle('Text with Lines - '..filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.filedropped(file)
|
function love.filedropped(file)
|
||||||
|
@ -69,6 +70,7 @@ function love.filedropped(file)
|
||||||
file:open('r')
|
file:open('r')
|
||||||
lines = load_from_file(file)
|
lines = load_from_file(file)
|
||||||
file:close()
|
file:close()
|
||||||
|
love.window.setTitle('Text with Lines - '..filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.draw()
|
function love.draw()
|
||||||
|
|
Loading…
Reference in New Issue