Recenter if the screen size isn't the same ?

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
Happy5354
Prole
Posts: 6
Joined: Thu Jan 22, 2015 3:32 am

Recenter if the screen size isn't the same ?

Post by Happy5354 »

Hey, I wonder how to recenter or redraw all the elements of the main.lua file, because right now my menu is drawn just one time so if I resize the window the buttons won't be in the middle again! How could i do that ?

I tried with this:

Code: Select all

if ScreenW ~= love.graphics.getWidth() or ScreenH ~= love.graphics.getHeight() then
		some stuff here
	end
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Recenter if the screen size isn't the same ?

Post by veethree »

Have a look at love.resize.
Post Reply

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 5 guests