當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。