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


Java Color.BLUE属性代码示例

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


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

示例1: convertColor

private Color convertColor(CustomColor color) {
    switch(color) {
        case WHITE:
            return Color.WHITE;
            
        case BLACK:
            return Color.BLACK;
            
        case BLUE:
            return Color.BLUE;
            
        default:
            return Color.RED;
    }
}
 
开发者ID:hogeschool,项目名称:INFSEN01-2,代码行数:15,代码来源:GDXDrawingAdapter.java

示例2: updateButton

@Override
public void updateButton(Button element, Float dt) {
    if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
        if (element.
                contains(new Point(
                        (float) Gdx.input.getX(),
                        (float) Gdx.input.getY()
                ))) {
            element.color = Color.BLUE;
            element.action.run();
        }
    } else {
        element.color = Color.WHITE;
    }
}
 
开发者ID:hogeschool,项目名称:INFSEN01-2,代码行数:15,代码来源:DefaultUpdateVisitor.java

示例3: convertColor

private Color convertColor(CustomColor color) {
    switch (color) {
        case WHITE:
            return Color.WHITE;

        case BLACK:
            return Color.BLACK;

        case BLUE:
            return Color.BLUE;

        default:
            return Color.RED;
    }
}
 
开发者ID:hogeschool,项目名称:INFSEN01-2,代码行数:15,代码来源:GDXDrawingAdapter.java

示例4: detcolor

public Color detcolor(int c){
    switch (c){
        case 1:{
            return Color.RED;
        }
        case 2:{
            return Color.BLUE;
        }
        case 3:{
            return Color.GREEN;
        }
    }
    return Color.BLACK;
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:14,代码来源:ScreenChat.java

示例5: TutorialDialog

public TutorialDialog(GameManager gMaps){
    super("", new WindowStyle(new BitmapFont(false), Color.BLUE, new BaseDrawable()));
    this.gameManager = gMaps;
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:4,代码来源:TutorialDialog.java

示例6: ManaReplenishLabel

public ManaReplenishLabel(String message, GameObject source)
{
	super(message, source, Color.BLUE);
}
 
开发者ID:MMORPG-Prototype,项目名称:MMORPG_Prototype,代码行数:4,代码来源:ManaReplenishLabel.java

示例7: init

private void init() {
	//开始界面控件初始化
	mAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.START_SETTING);
	mRangeAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.RANGE_WIDGET);
	mStartBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("startBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("startBtnDown")));

	mSettingBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("settingBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("settingBtnDown")));
	mStartBtn.setSize(280, 100);
	mSettingBtn.setSize(280, 100);
	//输入姓名对话框
	mInputnameDialog = new InputnameDialog(MyGdxGame.VIEW_WIDTH / 2, MyGdxGame.VIEW_HEIGHT / 2);
	//警告对话框
	mWarningDialog = new NameWarningDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	//开始界面 - 排行榜
	mRangeBtn = new ImageButton(new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnUp")),
			new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnDown")));
	mRangeBtn.setSize(280, 100);
	//初始化排行榜对话框
	mRangeDialog = new RankingDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	mStartBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 20, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 20);
	mRangeBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 100);
	mSettingBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);

	//设置界面初始化 - 是否打开音效
	Drawable checkOn = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOn"));
	Drawable checkOff = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOff"));
	CheckBox.CheckBoxStyle boxStyle = new CheckBox.CheckBoxStyle(checkOff, checkOn,
			MyGdxGame.assetManager.getFont(), Color.BLUE);
	mCheckBox = new CheckBox("", boxStyle);
	mCheckBox.setSize(255, 100);
	mCheckBox.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 38, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 40);
	if (isPlay) {
		mCheckBox.setChecked(true);
	} else {
		mCheckBox.setChecked(false);
	}

	//设置界面初始化 - 关于我们
	mAboutBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("aboutBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("aboutBtnDown")));
	mAboutBtn.setSize(280, 100);
	mAboutBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 110);
	mAboutGameDialog = new AboutGameDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	//设置界面初始化 - 返回按钮
	mBackButton = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("backStartBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("backStartBtnDown")));
	mBackButton.setSize(280, 100);
	mBackButton.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);

	//背景音乐
	if (isPlay) {
		MyGdxGame.assetManager.getMusic(Constant.START_BGM).play();
	} else {
		MyGdxGame.assetManager.getMusic(Constant.START_BGM).pause();
	}

	//初始化监听
	initListener();
}
 
开发者ID:heyzqt,项目名称:libGdx-xiyou,代码行数:64,代码来源:Start.java


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