本文整理汇总了Java中org.robovm.apple.uikit.UIInterfaceOrientationMask类的典型用法代码示例。如果您正苦于以下问题:Java UIInterfaceOrientationMask类的具体用法?Java UIInterfaceOrientationMask怎么用?Java UIInterfaceOrientationMask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIInterfaceOrientationMask类属于org.robovm.apple.uikit包,在下文中一共展示了UIInterfaceOrientationMask类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
// create our game
new CuteGame(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例2: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new Drop(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例3: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
// create our game
new HelloGame(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例4: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.Landscape;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
new Physics(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例5: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and register the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
// create and initialize our game
TestsGame game = new TestsGame(pf, new String[0]);
// make our main window visible
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例6: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new SimGame(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例7: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new Ziggurat(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例8: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
boolean iPad = (bounds.getWidth() >= 768);
new Pokeros(plat, iPad ? 0.75f : 0.5f);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例9: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
try {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and register the PlayN platform; start our game
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.register(window, config);
pf.run(new Samsara());
// make our main window visible
window.makeKeyAndVisible();
addStrongRef(window);
} catch (Throwable t) {
Foundation.log("Crash!");
Foundation.log(t.toString());
}
return true;
}
示例10: didFinishLaunching
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
final Showcase game = new Showcase(pf, new Showcase.DeviceService() {
public String info () {
UIDevice device = UIDevice.getCurrentDevice();
return "iOS [model=" + device.getModel() +
", os=" + device.getSystemName() + "/" + device.getSystemVersion() +
", name=" + device.getName() +
", orient=" + device.getOrientation() + "]";
}
});
pf.orient.connect(new Slot<RoboOrientEvent>() {
public void onEmit (RoboOrientEvent event) {
if (event instanceof RoboOrientEvent.DidRotate) {
game.rotate.emit(game);
}
}
});
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例11: getSupportedInterfaceOrientations
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations () {
long mask = 0;
if (app.config.orientationLandscape) {
mask |= ((1 << UIInterfaceOrientation.LandscapeLeft.value()) | (1 << UIInterfaceOrientation.LandscapeRight.value()));
}
if (app.config.orientationPortrait) {
mask |= ((1 << UIInterfaceOrientation.Portrait.value()) | (1 << UIInterfaceOrientation.PortraitUpsideDown.value()));
}
return new UIInterfaceOrientationMask(mask);
}
示例12: getSupportedInterfaceOrientations
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override // from ViewController
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
return plat.config.orients;
}
示例13: getSupportedInterfaceOrientations
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
return UIInterfaceOrientationMask.Portrait;
}
示例14: getSupportedInterfaceOrientations
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
return UIInterfaceOrientationMask.All;
}
示例15: getSupportedInterfaceOrientations
import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
return UIInterfaceOrientationMask.AllButUpsideDown;
}