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


Java VisLabel.setColor方法代码示例

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


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

示例1: show

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
@Override
public void show() {
    stage = new Stage();
    Gdx.input.setInputProcessor(stage);

    VisUI.load();

    CenteredTableBuilder tableBuilder = new CenteredTableBuilder(new Padding(2, 3));

    VisLabel heading = new VisLabel("Credits");
    heading.setColor(Color.BLACK);
    tableBuilder.append(heading).row();
    stage.addActor(heading);

    VisLabel temp = new VisLabel("To Be Implemented");
    temp.setColor(Color.BLACK);
    tableBuilder.append(temp).row();
    stage.addActor(temp);

    VisTextButton backButton = new VisTextButton("Back");
    backButton.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen());
        }
    });
    tableBuilder.append(backButton).row();
    stage.addActor(backButton);

    Table table = tableBuilder.build();
    table.setFillParent(true);
    stage.addActor(table);
}
 
开发者ID:MiniDigger,项目名称:projecttd,代码行数:34,代码来源:CreditsScreen.java

示例2: show

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
@Override
public void show() {
    stage = new Stage();
    Gdx.input.setInputProcessor(stage);

    VisUI.load();

    CenteredTableBuilder tableBuilder = new CenteredTableBuilder(new Padding(2, 3));

    VisLabel heading = new VisLabel("Options");
    heading.setColor(Color.BLACK);
    tableBuilder.append(heading).row();
    stage.addActor(heading);

    VisLabel temp = new VisLabel("To Be Implemented");
    temp.setColor(Color.BLACK);
    tableBuilder.append(temp).row();
    stage.addActor(temp);

    VisTextButton backButton = new VisTextButton("Back");
    backButton.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenuScreen());
        }
    });
    tableBuilder.append(backButton).row();
    stage.addActor(backButton);

    Table table = tableBuilder.build();
    table.setFillParent(true);
    stage.addActor(table);
}
 
开发者ID:MiniDigger,项目名称:projecttd,代码行数:34,代码来源:OptionsScreen.java

示例3: FolderItem

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
public FolderItem (FileHandle file, boolean root) {
	this.file = file;
	VisLabel name = new VisLabel(file.name(), "small");
	name.setEllipsis(true);
	add(new Image(Icons.FOLDER.drawable())).size(20).padTop(3);
	add(name).expand().fill().padRight(5);
	if (root) {
		VisLabel rootLabel = new VisLabel("[root]", "small");
		rootLabel.setColor(Color.GRAY);
		add(rootLabel);
	}
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:13,代码来源:FolderItem.java

示例4: createUI

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
private void createUI () {
	projectRoot = new VisValidatableTextField("");
	outputDirectory = new VisValidatableTextField("");
	chooseRootButton = new VisTextButton("Choose...");
	chooseOutputButton = new VisTextButton("Choose...");

	errorLabel = new VisLabel();
	errorLabel.setColor(Color.RED);
	errorLabel.setWrap(true);

	TableUtils.setSpacingDefaults(this);
	columnDefaults(0).left();
	columnDefaults(1).expandX().fillX();

	row().padTop(4);
	add(new VisLabel("Project root"));
	add(projectRoot);
	add(chooseRootButton);
	row();

	add(new VisLabel("Output folder"));
	add(outputDirectory);
	add(chooseOutputButton);
	row();
	add(new VisLabel("Output folder is cleared on each export!")).colspan(3).row();

	VisTable buttonTable = new VisTable(true);
	buttonTable.defaults().minWidth(70);

	cancelButton = new VisTextButton("Cancel");
	createButton = new VisTextButton("Create");
	createButton.setDisabled(true);

	buttonTable.add(errorLabel).fill().expand();
	buttonTable.add(cancelButton).top();
	buttonTable.add(createButton).top();

	add(buttonTable).colspan(3).fillX().expandX();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:40,代码来源:NewProjectDialogGeneric.java

示例5: createUI

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
@Override
protected void createUI () {
	viewportModeSelectBox = new EnumSelectBox<>(SceneViewport.class, new PrettyEnumNameProvider<>());
	viewportModeSelectBox.setSelectedEnum(scene.viewport);

	//TODO error msg can't fit on window, for now we don't display it at all
	errorLabel = new VisLabel();
	errorLabel.setColor(Color.RED);

	TableUtils.setSpacingDefaults(this);
	columnDefaults(0).left();

	row().padTop(4);

	add(new VisLabel("Viewport"));
	add(viewportModeSelectBox).expand().fill();
	row();

	widthField = new VisValidatableTextField(String.valueOf(scene.width));
	heightField = new VisValidatableTextField(String.valueOf(scene.height));
	widthField.setTextFieldFilter(new FloatDigitsOnlyFilter(false));
	heightField.setTextFieldFilter(new FloatDigitsOnlyFilter(false));

	VisTable sizeTable = new VisTable(true);
	add(new VisLabel("Width"));
	sizeTable.add(widthField).width(60);
	sizeTable.add(new VisLabel("Height"));
	sizeTable.add(heightField).width(60);

	add(sizeTable).expand().fill();
	row();

	add(getButtonTable()).colspan(2).fill().expand();
	padBottom(5);
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:36,代码来源:SceneSettingsDialog.java

示例6: createUI

import com.kotcrab.vis.ui.widget.VisLabel; //导入方法依赖的package包/类
private void createUI () {
	projectRoot = new VisValidatableTextField("");
	chooseRootButton = new VisTextButton("Choose...");
	sourceLoc = new VisValidatableTextField("/core/src");
	assetsLoc = new VisValidatableTextField("/android/assets");

	errorLabel = new VisLabel();
	errorLabel.setColor(Color.RED);

	TableUtils.setSpacingDefaults(this);
	columnDefaults(0).left();
	columnDefaults(1).width(300);

	row().padTop(4);
	add(new VisLabel("Project root"));
	add(projectRoot);
	add(chooseRootButton);
	row();

	add(new VisLabel("Source folder"));
	add(sourceLoc).fill();
	row();

	add(new VisLabel("Assets folder"));
	add(assetsLoc).fill();
	row();

	add(new VisLabel("Assets folder is cleared on each export!")).colspan(3).row();

	VisTable buttonTable = new VisTable(true);
	buttonTable.defaults().minWidth(70);

	cancelButton = new VisTextButton("Cancel");
	createButton = new VisTextButton("Create");
	createButton.setDisabled(true);

	buttonTable.add(errorLabel).fill().expand();
	buttonTable.add(cancelButton);
	buttonTable.add(createButton);

	add(buttonTable).colspan(3).fillX().expandX();
}
 
开发者ID:kotcrab,项目名称:vis-editor,代码行数:43,代码来源:NewProjectDialogLibGDX.java


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