本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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();
}
示例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);
}
示例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();
}