Rotation Handling

5 posts / 0 new
Last post
StagiaireINA
Offline
Last seen: 2 years 1 month ago
Joined: 7 Mar 2012 - 14:28
Rotation Handling

Is there a way to catch and handle the rotation of a device using JUCE? I'd just wish to repaint and change the size of some components of my app when the orientation changes.

Thank you

symfonysid
Offline
Last seen: 3 months 5 days ago
Joined: 23 Sep 2008 - 17:06
Re: Rotation Handling

resized() is called when a device rotates.

StagiaireINA
Offline
Last seen: 2 years 1 month ago
Joined: 7 Mar 2012 - 14:28
Re: Rotation Handling

That's what I thought but when I put breakpoints on resized(), it doesn't stop the program when I rotate the Ipad (yes, breakpoints are activated and it runs in Debug mode). To be sure, I wrote: Logger::outputDebugString("resized called"); in the function and again, nothing is written when I rotate the device.

jules
Online
Last seen: 4 min 12 sec ago
Joined: 29 Apr 2013 - 18:37
Re: Rotation Handling

Unless your screen is square, then your component will definitely be resized, and resized() is always called when things resize.

Maybe check for silly mistakes like checking the resized() of the wrong component?

StagiaireINA
Offline
Last seen: 2 years 1 month ago
Joined: 7 Mar 2012 - 14:28
Re: Rotation Handling

Well you were right, my bad!
Thanks again