Hello folks,
I have been struggling to find a proper way to handle screen resize event. What I have done already is to check if the width and height of the window have been changed, in love.update(dt). I'm sure there is a better way to do it.
Handling resize event
- soulaymenc
- Prole
- Posts: 36
- Joined: Thu Jul 11, 2013 2:03 pm
- Contact:
Handling resize event
This world is so strange.
Re: Handling resize event
I am not 100% sure I understand what the problem is. But you could do whatever you want to do based on the player changing something in the options. So rather than checking if the screen size has changed, you trigger your thing the moment the player presses the button that activates the change.soulaymenc wrote:Hello folks,
I have been struggling to find a proper way to handle screen resize event. What I have done already is to check if the width and height of the window have been changed, in love.update(dt). I'm sure there is a better way to do it.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Handling resize event
There is a callback for that, [wiki]love.resize[/wiki], that you can use like love.update, love.draw, love.keypressed, etc.
Help us help you: attach a .love.
- soulaymenc
- Prole
- Posts: 36
- Joined: Thu Jul 11, 2013 2:03 pm
- Contact:
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests