Java Code Examples for com.badlogic.gdx.Application#ApplicationType

The following examples show how to use com.badlogic.gdx.Application#ApplicationType . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopCompatibility.java    From Cubes with MIT License 6 votes vote down vote up
protected DesktopCompatibility(DesktopLauncher desktopLauncher, Application.ApplicationType applicationType, String[] arg) {
  super(desktopLauncher, applicationType);
  this.arg = arg;

  String str = (System.getProperty("os.name")).toUpperCase();
  if (str.contains("WIN")) {
    os = OS.Windows;
  } else if (str.contains("MAC")) {
    os = OS.Mac;
  } else if (str.contains("LINUX")) {
    os = OS.Linux;
  } else {
    os = OS.Unknown;
  }

  modLoader = new DesktopModLoader();
}
 
Example 2
Source File: ReflectionLoader.java    From gdx-facebook with Apache License 2.0 5 votes vote down vote up
private static String artifactByAppType(final Application.ApplicationType type) {
    if (type == Application.ApplicationType.Android) {
        return "android";
    }
    if (type == Application.ApplicationType.iOS) {
        return "ios";
    }
    if (type == Application.ApplicationType.Desktop) {
        return "desktop";
    }
    return "unknown_type";
}
 
Example 3
Source File: CubesShaderProvider.java    From Cubes with MIT License 5 votes vote down vote up
private static String getGlobalPrefix() {
  StringBuilder stringBuilder = new StringBuilder();
  Application.ApplicationType type = Compatibility.get().getApplicationType();
  if (type != Application.ApplicationType.Desktop || Settings.getBooleanSettingValue(Settings.GRAPHICS_SIMPLE_SHADER)) {
    stringBuilder.append("#define simpleOperations\n");
  } else {
    stringBuilder.append("#version 130\n");
  }
  return stringBuilder.toString();
}
 
Example 4
Source File: Compatibility.java    From Cubes with MIT License 4 votes vote down vote up
protected Compatibility(Launcher launcher, Application.ApplicationType applicationType) {
  if (compatibility != null) throw new IllegalStateException();
  this.launcher = launcher;
  this.applicationType = applicationType;
}