How to add window settings in main.lua file?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
sxnvmqe
Prole
Posts: 1
Joined: Wed Dec 13, 2023 6:15 pm

How to add window settings in main.lua file?

Post by sxnvmqe »

I have created a config file while I watched tutorials and I want to move this to main.lua file. Show to do that? I know it belongs to function .love.load() but I don't know how to get it work.

function love.conf(app)
app.window.title = "simpleGame"
app.window.icon = "img/icon.png"
app.window.width = 320
app.window.height = 160
app.window.display = 4
end
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to add window settings in main.lua file?

Post by zorg »

Why do you want to move it into main.lua? Just leave it in conf.lua... also, it does not "belong to function love.load()" whatever that means.

If you want to defer creation of the window, you still need a conf.lua file where you do... in your case, app.window = false,
then in love.load, you can create the window yourself with whatever size you need, but you need to call more functions instead of just setting table values. love.window.setMode for starters.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 67 guests