Java 类com.badlogic.gdx.backends.iosrobovm.IOSApplication 实例源码

项目:cachebox3.0    文件:GenerateApiKeyWebViewController.java   
@Override
public void didFinishLoad(UIWebView webView) {
    String loadedUrl = webView.getRequest().getURL().getAbsoluteString();
    log.debug("DidFinishHtmlLoad {}", loadedUrl);

    if (loadedUrl.startsWith("http://oauth.team-cachebox.de/")
            || loadedUrl.startsWith("http://staging.oauth.team-cachebox.de/")) {
        //parse content of oauth result
        String content = webView.evaluateJavaScript("document.body.textContent");

        String search = "Access token: ";
        int pos = content.indexOf(search) + search.length();
        // between pos und pos2 shut be a valid  AccessToken!!!
        final String accessToken = content.substring(pos).trim();

        log.debug("pos: {}, AccesToken= {}", pos, accessToken);
        this.callBack.callBack(accessToken);
        //reload GlView
        webView.removeFromSuperview();
        ((IOSApplication) Gdx.app).getUIWindow().setRootViewController(this.mainViewController);
        ((IOSApplication) Gdx.app).getUIWindow().makeKeyAndVisible();
    }

}
项目:cachebox3.0    文件:IOS_PlatformConnector.java   
@Override
protected void getPlatformDescriptionView(final GenericCallBack<PlatformDescriptionView> callBack) {
    log.debug("show WebView as descriptionView");
    try {
        if (descriptionView == null) {
            UIViewController mainViewController = ((IOSApplication) Gdx.app).getUIWindow().getRootViewController();
            descriptionView = new IOS_DescriptionView(mainViewController);
            log.debug("return new DescriptionView");
        } else {
            log.debug("return existing DescriptionView");
        }
        callBack.callBack(descriptionView);
    } catch (Exception e) {
        log.error("show web view", e);
    }

}
项目:nvlist    文件:IosLauncher.java   
@Override
protected IOSApplication createApplication() {
    Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread t, Throwable e) {
            /*
             * Avoid instantiating LoggerFactory in a static context to work around a race condition
             * caused by IOSApplication changing System.out/System.err
             */
            Logger logger = LoggerFactory.getLogger(IosLauncher.class);
            logger.error("Uncaught exception from {}", t, e);
        }
    });

    IOSApplicationConfiguration config = new IOSApplicationConfiguration();

    InternalGdxFileSystem resourceFileSystem = new InternalGdxFileSystem("");
    IosLocalFileSystem outputFileSystem = new IosLocalFileSystem();
    Launcher launcher = new Launcher(resourceFileSystem, outputFileSystem);

    return new IOSApplication(launcher, config);
}
项目:EarthInvadersGDX    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Game(new Advertisements() {
        @Override
        public void showAds() {

        }
    }), config);
}
项目:PixelDungeonTC    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication()
{
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    final String version = NSBundle.getMainBundle().getInfoDictionaryObject("CFBundleShortVersionString").toString();
    return new IOSApplication(new PixelDungeon(new PDPlatformSupport(version, null, new IOSInputProcessor())), config);
}
项目:cachebox3.0    文件:IOS_Launcher.java   
@Override
protected IOSApplication createApplication() {

    CB.setGlobalScale(1);

    final String appDir = System.getenv("HOME");
    final String localPath = appDir + "/Library/local/";

    LibgdxLogger.PROPERTIES_FILE_HANDLE = new LibgdxLoggerIosFileHandle(localPath, Files.FileType.Absolute).child(LibgdxLogger.CONFIGURATION_FILE_XML);
    LibgdxLogger.initial(LibgdxLogger.PROPERTIES_FILE_HANDLE);


    //initialize platform bitmap factory
    IosGraphics.init();


    //initialize platform connector
    PlatformConnector.init(new IOS_PlatformConnector(this));
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    config.multisample = GLKViewDrawableMultisample._4X;
    config.orientationLandscape = false;
    config.orientationPortrait = true;
    config.stencilFormat = GLKViewDrawableStencilFormat._8;
    GdxAssets.init("assets/");
    GLAdapter.init(new IosGL());

    return new IOSApplication(new CacheboxMain(), config);
}
项目:cachebox3.0    文件:IOS_DescriptionView.java   
@Override
public void display() {
    CGRect rect = new CGRect(20, 20, 200, 200);
    webView.setAccessibilityFrame(rect);
    mainViewController.addChildViewController(this);
    webView.setBounds(rect);
    ((IOSApplication) Gdx.app).getUIWindow().addSubview(webView);
}
项目:cachebox3.0    文件:IOS_PlatformConnector.java   
@Override
protected void generateApiKey(GenericCallBack<String> callBack) {
    log.debug("show WebView for get API key");
    try {
        UIViewController mainViewController = ((IOSApplication) Gdx.app).getUIWindow().getRootViewController();
        GenerateApiKeyWebViewController controller = new GenerateApiKeyWebViewController(callBack, mainViewController);
        ((IOSApplication) Gdx.app).getUIWindow().setRootViewController(controller);
        ((IOSApplication) Gdx.app).getUIWindow().makeKeyAndVisible();
    } catch (Exception e) {
        log.error("show web view", e);
    }
}
项目:cachebox3.0    文件:IOS_PlatformConnector.java   
@Override
public void _getMultilineTextInput(final Input.TextInputListener listener, String title, String text, String hint) {

    textInputView = new IOS_TextInputView(((IOSApplication) Gdx.app).getUIWindow()
            .getRootViewController(), text, new IOS_TextInputView.Callback() {
        @Override
        public void okClicked(String text) {
            listener.input(text);
            Gdx.app.postRunnable(new Runnable() {
                @Override
                public void run() {
                    disposeInputView();
                }
            });
        }

        @Override
        public void cancelClicked() {
            Gdx.app.postRunnable(new Runnable() {
                @Override
                public void run() {
                    disposeInputView();
                }
            });
        }
    });


    // buildUIAlertView(listener, title, text, hint);
}
项目:robovm-ios-bindings    文件:IOSLauncher.java   
private void domob() {
    final UIViewController controller = ((IOSApplication)
              Gdx.app).getUIViewController();

    DMSplashAdController cotroller = new DMSplashAdController("56OJzBWouN1uFPD9LZ", "16TLmT-vApG01NUvNJDvaK-s", getWindow());
    cotroller.setDelegate(this);
    //cotroller.loadView();
    cotroller.present();
//  if (cotroller.getIsReady()) {
        //cotroller.present();
//  }
}
项目:robovm-ios-bindings    文件:IOSLauncher.java   
@Override
public void showBanner() {
    /*
     * final GADBannerView mBannerView = new
     * GADBannerView(GADAdSize.smartBannerPortrait());
     * mBannerView.setAdUnitID("ca-app-pub-1743332321423234/2574098708");
     * 
     * final UIViewController controller = ((IOSApplication)
     * Gdx.app).getUIViewController();
     * 
     * GADRequest request = GADRequest.create(); List<String> devices = new
     * ArrayList<String>(); devices.add(GADRequest.GAD_SIMULATOR_ID);
     * mBannerView.setRootViewController(controller);
     * controller.getView().addSubview(mBannerView);
     * 
     * mBannerView.loadRequest(request);
     */
    final UIViewController controller = ((IOSApplication)
              Gdx.app).getUIViewController();

    DMAdView mAdView = new DMAdView("56OJzBWouN1uFPD9LZ", "16TLmT-vApG01NUvNBqMTlRz");
    mAdView.setDelegate(this);
    mAdView.setFrame(new CGRect(0, 0, DMAdView.DOMOB_AD_SIZE_320x50.getWidth(), DMAdView.DOMOB_AD_SIZE_320x50.getHeight()));
    mAdView.setRootViewController(controller);
    controller.getView().addSubview(mAdView);
    mAdView.loadAd();


}
项目:ggvm    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GGVmApplication(GameModuleProvider.provideGameModule(), MobileMenu.class, TouchInputProcessor.class), config);
}
项目:Race99    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MainClass(), config);
}
项目:libgdx-learnlib    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MyGdxGame(), config);
}
项目:odb-artax    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GdxArtemisGame(), config);
}
项目:penguins-in-space    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Asteroids(), config);
}
项目:FlappyChapa    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new FlappyChapa(), config);
}
项目:Caramelos    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new CaramelosGame(), config);
}
项目:drc-sim-client    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    Control[] controls = new Control[] {new ControlTouch()};
    return new IOSApplication(new Client(controls, new Audio()), config);
}
项目:Flappy-Baranus    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new FlappyBaran(), config);
}
项目:curiosone-app    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MyGdxGame(), config);
}
项目:Klooni1010    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Klooni(null), config);
}
项目:Polymorph    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Polymorph(), config);
}
项目:Ponytron    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new PonytronGame(), config);
}
项目:gdx-complextext    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MyGdxGame(), config);
}
项目:guitar-finger-trainer    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GftGame(), config);
}
项目:odb-little-fortune-planet    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GdxArtemisGame(), config);
}
项目:MyRoom    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new ZombieBirdGame(), config);
}
项目:Onyx    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new OnyxGame(), config);
}
项目:odb-dynasty    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GdxArtemisGame(), config);
}
项目:confundrum    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Confundrum(), config);
}
项目:le-pendu    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new LePendu(), config);
}
项目:QuackHack    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new QuackHack(), config);
}
项目:drc-sim-client    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    Control[] controls = new Control[] {new ControlTouch()};
    return new IOSApplication(new Client(controls, new Audio()), config);
}
项目:msdfgen-libgdxtest    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MSDFTestGame(), config);
}
项目:planetbusters    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new myCanvas(), config);
}
项目:Planetbase    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new PewPew(), config);
}
项目:Planetbase    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new RebelInvader(), config);
}
项目:rebel-invader    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new RebelInvader(), config);
}
项目:Space-Bombs    文件:IOSLauncher.java   
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Main(), config);
}