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


Java LwjglApplicationConfiguration.addIcon方法代码示例

本文整理汇总了Java中com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration.addIcon方法的典型用法代码示例。如果您正苦于以下问题:Java LwjglApplicationConfiguration.addIcon方法的具体用法?Java LwjglApplicationConfiguration.addIcon怎么用?Java LwjglApplicationConfiguration.addIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration的用法示例。


在下文中一共展示了LwjglApplicationConfiguration.addIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = FlappyChapa.WIDTH;
	config.height = FlappyChapa.HEIGHT;
	config.title = FlappyChapa.TITLE;
	config.addIcon("icons/chapaicon.png", Files.FileType.Internal);
	config.addIcon("icons/chapaicon1.png", Files.FileType.Internal);
       config.addIcon("icons/chapaicon2.png", Files.FileType.Internal);
	new LwjglApplication(new FlappyChapa(), config);
}
 
开发者ID:RubenMateus,项目名称:FlappyChapa,代码行数:11,代码来源:DesktopLauncher.java

示例2: run

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
@Override
protected void run(ApplicationListener applicationListener) {
  LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

  config.addIcon("assets/icon-16x.png", Files.FileType.Internal);
  config.addIcon("assets/icon-32x.png", Files.FileType.Internal);
  config.addIcon("assets/icon-64x.png", Files.FileType.Internal);
  config.addIcon("assets/icon-128x.png", Files.FileType.Internal);

  config.vSyncEnabled = false;
  config.foregroundFPS = 0;
  config.backgroundFPS = 0;

  config.width = windowWidth;
  config.height = windowHeight;

  config.forceExit = false;

  new LwjglApplication(applicationListener, config);
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:21,代码来源:ClientCompatibility.java

示例3: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 1280;
	config.height = 720;
	config.title = Constants.NAME;
	config.backgroundFPS = 30;
	if (System.getProperties().getProperty("os.name").toLowerCase().contains("mac")) {
		config.addIcon("image/icon-512.png", Files.FileType.Internal);
		config.addIcon("image/icon-256.png", Files.FileType.Internal);
	}
	config.addIcon("image/icon-32.png", Files.FileType.Internal);
	config.addIcon("image/icon-16.png", Files.FileType.Internal);
	ArgumentParser argParser = new ArgumentParser(arg);
	Control[] controls = new Control[argParser.touchControl ? 3 : 2];
	controls[0] = new ControlKeyboard();
	controls[1] = new ControlController();
	if (argParser.touchControl)
		controls[2] = new ControlTouch();
	new LwjglApplication(new Client(controls, new Audio(), argParser), config);
}
 
开发者ID:rolandoislas,项目名称:drc-sim-client,代码行数:21,代码来源:DesktopLauncher.java

示例4: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
		LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		cfg.title = "Inspiration";
		cfg.useGL30 = false;
		cfg.width = 640;
		cfg.height = 480;
//		cfg.width = 800;
//		cfg.height = 600;
		// fullscreen
// 		cfg.fullscreen = true;
		// vSync
// 		cfg.vSyncEnabled = true;
		cfg.addIcon("icon.png", Files.FileType.Internal);
		Gdx.app  = new LwjglApplication(new Inspiration(), cfg);
		//Gdx.app.setLogLevel(Application.LOG_INFO);
		Gdx.app.setLogLevel(Application.LOG_DEBUG);
		//Gdx.app.setLogLevel(Application.LOG_ERROR);
		//Gdx.app.setLogLevel(Application.LOG_NONE);
	}
 
开发者ID:Mignet,项目名称:Inspiration,代码行数:20,代码来源:DebugDesktopLauncher.java

示例5: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
		LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		cfg.title = "Inspiration";
		cfg.useGL30 = false;
		cfg.width = 640;
		cfg.height = 480;
//		cfg.width = 800;
//		cfg.height = 600;
		// fullscreen
// 		cfg.fullscreen = true;
		// vSync
// 		cfg.vSyncEnabled = true;
		cfg.addIcon("icon.png", Files.FileType.Internal);
		Gdx.app  = new LwjglApplication(new Inspiration(), cfg);
		//Gdx.app.setLogLevel(Application.LOG_INFO);
//		Gdx.app.setLogLevel(Application.LOG_DEBUG);
		//Gdx.app.setLogLevel(Application.LOG_ERROR);
		//Gdx.app.setLogLevel(Application.LOG_NONE);
	}
 
开发者ID:Mignet,项目名称:Inspiration,代码行数:20,代码来源:DesktopLauncher.java

示例6: start

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void start(Arguments arguments) {
	LoggerUtils.setupExternalFileOutput();

	final LwjglApplicationConfiguration configuration = new LwjglApplicationConfiguration();
	configuration.title = AppConstants.APP_TITLE;
	configuration.addIcon("icon128.png", Files.FileType.Classpath);
	configuration.addIcon("icon32.png", Files.FileType.Classpath);
	configuration.addIcon("icon16.png", Files.FileType.Classpath);
	configuration.preferencesDirectory = AppConstants.EXTERNAL_DIR;
	configuration.width = 1024;
	configuration.height = 600;
	configuration.allowSoftwareMode = arguments.softOpenGL;

	AppParams appParams = new AppParams();
	appParams.startupProject = arguments.project;

	App app = new App(new DesktopClassScanner(), appParams);
	new LwjglApplication(new WindowParamsPersistingApplicationWrapper(app, configuration), configuration);
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:20,代码来源:GLSurfaceLauncher.java

示例7: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 800;
	config.height = 800;
	config.resizable = false;
	config.title = "HexCity";
	config.addIcon("icons/icon-128.png", Files.FileType.Internal);
	config.addIcon("icons/icon-32.png", Files.FileType.Internal);
	config.addIcon("icons/icon-16.png", Files.FileType.Internal);
	new LwjglApplication(new LudumDare38(), config);
}
 
开发者ID:MartensCedric,项目名称:LD38-Compo,代码行数:12,代码来源:DesktopLauncher.java

示例8: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.title = "ShootMe";
	config.width = 1280;
	config.height = 720;
	config.addIcon("assets/guenter_icon32px.png", Files.FileType.Internal);
       config.addIcon("assets/guenter_icon16px.png", Files.FileType.Internal);
       config.resizable = false;
	new LwjglApplication(new ShootMeGame(), config);
}
 
开发者ID:daxandi,项目名称:ShootMe,代码行数:11,代码来源:DesktopLauncher.java

示例9: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
    //Initialize log file
       try {
           File file = new File("log.txt");
           if (file.exists()) {
               file.delete();
           }
           PrintStream printStream = new PrintStream(file);
           System.setOut(printStream);
           System.setErr(printStream);
       } catch (FileNotFoundException fileNotFoundException) {
           System.out.println("Could not create log file.");
       }
       //Initialize application
       Graphics.DisplayMode selectedDisplayMode = LwjglApplicationConfiguration.getDesktopDisplayMode();
       if (selectedDisplayMode != null) {
           GameModule gameModule = GameModuleProvider.provideGameModule();
           LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
           config.setFromDisplayMode(selectedDisplayMode);
           config.vSyncEnabled = true;
           if (gameModule.provideIconFileName() != null) {
               config.addIcon(gameModule.provideIconFileName(), Files.FileType.Internal);
           }
           new LwjglApplication(new GGVmApplication(gameModule, PCMenu.class, KeyboardInputProcessor.class), config);
       } else {
           System.out.println("Sorry, this game requires a graphics card that can display 32 bpp!");
       }
}
 
开发者ID:gradualgames,项目名称:ggvm,代码行数:29,代码来源:DesktopLauncher.java

示例10: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

    config.addIcon("icons/conquest-128.png", Files.FileType.Internal);
    config.addIcon("icons/conquest-32.png", Files.FileType.Internal);
    config.addIcon("icons/conquest-16.png", Files.FileType.Internal);

    config.resizable = false;
    config.width = 1280;
    config.height = 720;

    new LwjglApplication(new Conquest(), config);
}
 
开发者ID:conquest,项目名称:conquest,代码行数:14,代码来源:DesktopLauncher.java

示例11: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
/**
 * Entry point.
 */
public static void main(String[] args) {
	Game game = new GameMain();
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.fullscreen = false;
	config.width = 960;
	config.height = 720;
	config.resizable = false;
	config.title = GameMain.GAME_TITLE;
	config.addIcon("resources/icon32.png", FileType.Internal);
	lwjglApplication = new LwjglApplication(game, config);
}
 
开发者ID:cn-s3bit,项目名称:TH902,代码行数:15,代码来源:Launcher.java

示例12: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "Klooni 1010!";
    config.width = Klooni.GAME_WIDTH;
    config.height = Klooni.GAME_HEIGHT;
    config.addIcon("ic_launcher/icon128.png", Files.FileType.Internal);
    config.addIcon("ic_launcher/icon32.png", Files.FileType.Internal);
    config.addIcon("ic_launcher/icon16.png", Files.FileType.Internal);
    new LwjglApplication(new Klooni(null), config);
}
 
开发者ID:LonamiWebs,项目名称:Klooni1010,代码行数:11,代码来源:DesktopLauncher.java

示例13: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] args) {
  	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
 		config.width = 80 * 11;
  	config.height = (24 + 8) * 22;
  	config.addIcon("Tentacle-16.png", Files.FileType.Internal);
  	config.addIcon("Tentacle-32.png", Files.FileType.Internal);
  	config.addIcon("Tentacle-128.png", Files.FileType.Internal);
config.title = "Awfice";
  	new LwjglApplication(new MySquidGame(), config);
  }
 
开发者ID:goyaak,项目名称:cascadian-order-office-roguelike,代码行数:11,代码来源:DesktopLauncher.java

示例14: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 960;
	config.height = 720;
	config.addIcon("interface/icons/turret-icon.png", Files.FileType.Internal);
	config.title = Game.TITLE;
	config.fullscreen = Game.isFullscreen;
	new LwjglApplication(new Game(), config);
}
 
开发者ID:JoakimRW,项目名称:ExamensArbeteTD,代码行数:10,代码来源:DesktopLauncher.java

示例15: main

import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; //导入方法依赖的package包/类
public static void main (String[] arg) {
	String version = DesktopLauncher.class.getPackage().getSpecificationVersion();
	if (version == null) {
		version = "1.0";
	}
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

	if (SharedLibraryLoader.isMac) {
		config.preferencesDirectory = "Library/Application Support/Pixel Dungeon/";
	} else if (SharedLibraryLoader.isLinux) {
		config.preferencesDirectory = ".watabou/pixel-dungeon/";
	} else if (SharedLibraryLoader.isWindows) {
		config.preferencesDirectory = "Saved Games/Pixel Dungeon/";
	}
	// FIXME: This is a hack to get access to the preferences before we have an application setup
	com.badlogic.gdx.Preferences prefs = new LwjglPreferences(Preferences.FILE_NAME, config.preferencesDirectory);

	boolean isFullscreen = prefs.getBoolean(Preferences.KEY_WINDOW_FULLSCREEN, false);
	config.fullscreen = isFullscreen;
	if (!isFullscreen) {
		config.width = prefs.getInteger(Preferences.KEY_WINDOW_WIDTH, Preferences.DEFAULT_WINDOW_WIDTH);
		config.height = prefs.getInteger(Preferences.KEY_WINDOW_HEIGHT, Preferences.DEFAULT_WINDOW_HEIGHT);
	}

	config.addIcon( "ic_launcher_128.png", Files.FileType.Internal );
	config.addIcon( "ic_launcher_32.png", Files.FileType.Internal );
	config.addIcon( "ic_launcher_16.png", Files.FileType.Internal );

	// TODO: It have to be pulled from build.gradle, but I don't know how it can be done
	config.title = "Pixel Dungeon";

	new LwjglApplication(new PixelDungeon(
			new DesktopSupport(version, config.preferencesDirectory, new DesktopInputProcessor())
	), config);
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:36,代码来源:DesktopLauncher.java


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