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


Java Color.getBlue方法代码示例

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


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

示例1: startGame

import de.lessvoid.nifty.tools.Color; //导入方法依赖的package包/类
public void startGame() {
	//TODO: without a player one cannot start
	String mapName = screen.findElementById("mapNameLabel").getRenderer(TextRenderer.class).getOriginalText();
	List<Element> children = playerScrollPanelPanel.getChildren();
	ArrayList<Player> players = new ArrayList<Player>();
	for (int i = 0; i < children.size(); i++) {
		Element child = children.get(i);
		String name = child.findNiftyControl("player" + i + "TextField", TextField.class).getDisplayedText();
		if (child.findElementById("player" + i + "Label").getRenderer(TextRenderer.class).getOriginalText().equals("AI:")) {
			System.err.println("AI not implemented yet. " + name + " excluded from Players.");
			continue;
		}
		Color colorNifty = screen.findElementById("color" + i).getRenderer(PanelRenderer.class).getBackgroundColor();
		org.newdawn.slick.Color colorSlick = new org.newdawn.slick.Color(colorNifty.getRed(), colorNifty.getGreen(), colorNifty.getBlue(), colorNifty.getAlpha());
		int team = Integer.parseInt(screen.findNiftyControl("team" + i, Button.class).getText().substring(5))-1;
		players.add(new Player(name, colorSlick, team));
	}

	Player[] player = new Player[players.size()];
	player = players.toArray(player);
	NiftyMenu.startGame(new Controller(MapList.getInstance().getMap(mapName), player, "Conquest"));
}
 
开发者ID:oberien,项目名称:Oberien,代码行数:23,代码来源:GameSetupScreenController.java

示例2: convertColor

import de.lessvoid.nifty.tools.Color; //导入方法依赖的package包/类
private int convertColor(Color color){
    int color2 = 0;
    color2 |= ((int)(255.0 * color.getAlpha())) << 24;
    color2 |= ((int)(255.0 * color.getBlue())) << 16;
    color2 |= ((int)(255.0 * color.getGreen())) << 8;
    color2 |= ((int)(255.0 * color.getRed()));
    return color2;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:9,代码来源:RenderDeviceJme.java

示例3: convertColor

import de.lessvoid.nifty.tools.Color; //导入方法依赖的package包/类
private int convertColor(Color color) {
    int color2 = 0;
    color2 |= ((int) (255.0 * color.getAlpha())) << 24;
    color2 |= ((int) (255.0 * color.getBlue())) << 16;
    color2 |= ((int) (255.0 * color.getGreen())) << 8;
    color2 |= ((int) (255.0 * color.getRed()));
    return color2;
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:9,代码来源:RenderDeviceJme.java


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