当前位置: 首页>>代码示例>>Java>>正文


Java UIInterfaceOrientationMask类代码示例

本文整理汇总了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;
}
 
开发者ID:playn,项目名称:playn-samples,代码行数:21,代码来源:CuteGameRoboVM.java

示例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;
}
 
开发者ID:playn,项目名称:playn-samples,代码行数:20,代码来源:DropRoboVM.java

示例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;
}
 
开发者ID:playn,项目名称:playn-samples,代码行数:21,代码来源:HelloGameRoboVM.java

示例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;
}
 
开发者ID:playn,项目名称:playn-samples,代码行数:20,代码来源:PhysicsRoboVM.java

示例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;
}
 
开发者ID:playn,项目名称:playn,代码行数:20,代码来源:TestsGameRoboVM.java

示例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;
}
 
开发者ID:social-startup-game,项目名称:social-startup-game,代码行数:20,代码来源:SimGameRoboVM.java

示例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;
}
 
开发者ID:samskivert,项目名称:mashups,代码行数:20,代码来源:ZigguratRoboVM.java

示例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;
}
 
开发者ID:samskivert,项目名称:mashups,代码行数:21,代码来源:PokerosRoboVM.java

示例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;
}
 
开发者ID:samskivert,项目名称:mashups,代码行数:24,代码来源:SamsaraRoboVM.java

示例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;
}
 
开发者ID:playn,项目名称:playn-samples,代码行数:35,代码来源:ShowcaseRoboVM.java

示例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);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:12,代码来源:IOSGraphics.java

示例12: getSupportedInterfaceOrientations

import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override // from ViewController
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
  return plat.config.orients;
}
 
开发者ID:playn,项目名称:playn,代码行数:5,代码来源:RoboViewController.java

示例13: getSupportedInterfaceOrientations

import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
    return UIInterfaceOrientationMask.Portrait;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:5,代码来源:GameViewController.java

示例14: getSupportedInterfaceOrientations

import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
    return UIInterfaceOrientationMask.All;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:5,代码来源:ViewController.java

示例15: getSupportedInterfaceOrientations

import org.robovm.apple.uikit.UIInterfaceOrientationMask; //导入依赖的package包/类
@Override
public UIInterfaceOrientationMask getSupportedInterfaceOrientations() {
    return UIInterfaceOrientationMask.AllButUpsideDown;
}
 
开发者ID:robovm,项目名称:robovm-samples,代码行数:5,代码来源:PhotoViewController.java


注:本文中的org.robovm.apple.uikit.UIInterfaceOrientationMask类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。