本文整理匯總了Java中com.badlogic.gdx.backends.iosrobovm.IOSApplication類的典型用法代碼示例。如果您正苦於以下問題:Java IOSApplication類的具體用法?Java IOSApplication怎麽用?Java IOSApplication使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IOSApplication類屬於com.badlogic.gdx.backends.iosrobovm包,在下文中一共展示了IOSApplication類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: didFinishLoad
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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();
}
}
示例2: getPlatformDescriptionView
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
}
示例3: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
示例4: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new Game(new Advertisements() {
@Override
public void showAds() {
}
}), config);
}
示例5: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
示例6: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
示例7: display
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
示例8: generateApiKey
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
}
示例9: _getMultilineTextInput
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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);
}
示例10: domob
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
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();
// }
}
示例11: showBanner
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@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();
}
示例12: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new GGVmApplication(GameModuleProvider.provideGameModule(), MobileMenu.class, TouchInputProcessor.class), config);
}
示例13: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new MainClass(), config);
}
示例14: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new MyGdxGame(), config);
}
示例15: createApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new GdxArtemisGame(), config);
}