import com.badlogic.gdx.Graphics;\r
import com.badlogic.gdx.Input;\r
import com.badlogic.gdx.Preferences;\r
-import com.badlogic.gdx.backends.ios.IOSApplicationConfiguration.SupportedOrientation;\r
import com.badlogic.gdx.utils.Clipboard;\r
\r
public class IOSApplication extends UIApplicationDelegate implements Application {\r
*/\r
public IOSApplication(ApplicationListener listener, IOSApplicationConfiguration config) {\r
this.listener = listener;\r
- this.config = config;\r
+ this.config = config; \r
Gdx.app = this;\r
}\r
\r
switch (orientation.Value) { \r
case UIInterfaceOrientation.LandscapeLeft: \r
case UIInterfaceOrientation.LandscapeRight: \r
- return config.supportedOrientation == SupportedOrientation.LANDSCAPE ||\r
- config.supportedOrientation == SupportedOrientation.BOTH;\r
+ return config.orientationLandscape;\r
default: \r
// assume portrait\r
- return config.supportedOrientation == SupportedOrientation.PORTRAIT ||\r
- config.supportedOrientation == SupportedOrientation.BOTH;\r
+ return config.orientationPortrait;\r
} \r
}\r
};\r
public class IOSApplicationConfiguration {
- /** The orientation the application/game is supporting. */
- public enum SupportedOrientation {
- /** Portrait only. */
- PORTRAIT,
- /** Landscape only. */
- LANDSCAPE,
- /** Both landscape & portrait. */
- BOTH;
- }
-
- /** The screen orientations the application supports. */
- public SupportedOrientation supportedOrientation = SupportedOrientation.BOTH;
+ /** whether or not portrait orientation is supported. */
+ public boolean orientationPortrait = true;
+ /** whether or not landscape orientation is supported. */
+ public boolean orientationLandscape = true;
/** whether to use the accelerometer **/
public boolean useAccelerometer = true;
/** the update interval to poll the accelerometer with, in seconds **/