本文整理汇总了Java中com.badlogic.gdx.graphics.Color.DARK_GRAY属性的典型用法代码示例。如果您正苦于以下问题:Java Color.DARK_GRAY属性的具体用法?Java Color.DARK_GRAY怎么用?Java Color.DARK_GRAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.Color
的用法示例。
在下文中一共展示了Color.DARK_GRAY属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
@Override
public void draw(Batch batch, float parentAlpha) {
Color color = getColor();
if (hidden) {
color = Color.DARK_GRAY;
} else if (selected) {
color = Assets.select(color);
} else if (hovered) {
color = Assets.highlight(color);
}
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
if (hidden) {
batch.draw(Assets.FOGGY, getX(), getY(), getWidth(), getHeight());
} else {
batch.draw(texture, getX(), getY(), getWidth(), getHeight());
}
if (city != null) {
city.draw(batch, parentAlpha);
}
}
示例2: renderGender
/**
* Zeigt den Geschlechtsauswahl Bildschirm an
*
* @param camera die aktuelle Kamera
*/
public void renderGender(OrthographicCamera camera)
{
Color maleColor;
Color femaleColor;
if (stateSwitch)
{
maleColor = Color.GREEN;
femaleColor = Color.DARK_GRAY;
} else {
maleColor = Color.DARK_GRAY;
femaleColor = Color.GREEN;
}
fontLayout.setText(font, localeBundle.get("geschlecht"), Color.WHITE, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 120);
fontLayout.setText(font, localeBundle.get("frau"), femaleColor, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, 30);
fontLayout.setText(font, localeBundle.get("mann"), maleColor, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, -30);
fontLayout.setText(smallFont, localeBundle.get("enter_bestaetigen"), Color.WHITE, camera.viewportWidth, Align.center, false);
smallFont.draw(batch, fontLayout, -camera.viewportWidth / 2, -camera.viewportHeight / 2 + 70);
}
示例3: renderTutorial
/**
* Zeigt den Tutorial-Wahl Bildschirm an
*
* @param camera die aktuelle Kamera
*/
public void renderTutorial(OrthographicCamera camera)
{
Color yesColor;
Color noColor;
if (stateSwitch)
{
yesColor = Color.GREEN;
noColor = Color.DARK_GRAY;
} else {
yesColor = Color.DARK_GRAY;
noColor = Color.GREEN;
}
fontLayout.setText(font, localeBundle.get("tutorial1"), Color.WHITE, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 120);
fontLayout.setText(font, localeBundle.get("tutorial2"), Color.WHITE, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 185);
fontLayout.setText(font, localeBundle.get("ja"), yesColor, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, 30);
fontLayout.setText(font, localeBundle.get("nein"), noColor, camera.viewportWidth, Align.center, false);
font.draw(batch, fontLayout, -camera.viewportWidth / 2, -30);
fontLayout.setText(smallFont, localeBundle.get("enter_bestaetigen"), Color.WHITE, camera.viewportWidth, Align.center, false);
smallFont.draw(batch, fontLayout, -camera.viewportWidth / 2, -camera.viewportHeight / 2 + 70);
}
示例4: GameScene
public GameScene(SceneData sceneData) {
super(SceneNames.GAME_SCENE, Color.DARK_GRAY);
this.sceneData = sceneData;
this.data = sceneData.getGameData();
}