Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Screenrotate issue with tier 2 xcode

Author
Message
Deion
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United States
Posted: 13th Sep 2011 03:15
i'm trying to make my game landscape only in tier 2 using xcode. in the UntitledViewController at function shouldAutoRotateToInterfaceOrientation if i change this to be



this will prevent the game from going into portrait mode. however when you launch the game the background image is no rotated 90 degrees and is squished. if you leave the above function the way it is, it is fine, however it goes in portrait mode and there are letterbox strips on top and bottom. so as to prevent this i thought id just disallow it to go in portrait mode, then saw thsi bug.

code example



see attached images KeepLandscape is what happens if i try to keep it landscape only, and AllowPortrait is what i want it to look like, but i dont want to allow portrait to get this.

Cheers,
Deion G.

Attachments

Login to view attachments
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Sep 2011 09:32
use:

agk::SetOrientationAllowed (0, 0, 1, 0);

and you are all set!
Deion
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United States
Posted: 15th Sep 2011 21:49
well this works if i still allow the xcode code to allow any rotation, however if in the controller i allow only landscape , same thing happens, but i guess this is good enough does the same exact thing.

thanks

Cheers,
Deion G.

Login to post a reply

Server time is: 2024-04-16 06:57:46
Your offset time is: 2024-04-16 06:57:46