本文整理汇总了Java中com.kotcrab.vis.ui.widget.VisCheckBox类的典型用法代码示例。如果您正苦于以下问题:Java VisCheckBox类的具体用法?Java VisCheckBox怎么用?Java VisCheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisCheckBox类属于com.kotcrab.vis.ui.widget包,在下文中一共展示了VisCheckBox类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getActorByName
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
public Actor getActorByName(String name){
switch (name){
case "Group":
return new Group();
case "Label":
return new NativeLabel("",getMainFont());
case "CheckBox":
return new VisCheckBox("");
case "Image":
return new Image(assetManager.get("badlogic.jpg",Texture.class));
case "Button":
return new VisImageButton(VisUI.getSkin().get(VisImageButton.VisImageButtonStyle.class));
case "TextField":
return new TextField("",VisUI.getSkin());
default:
return new Actor();
}
}
开发者ID:whitecostume,项目名称:libgdx_ui_editor,代码行数:19,代码来源:EditorManager.java
示例2: buildTable
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
public void buildTable () {
VisTable sizeTable = new VisTable(true);
sizeTable.add(new VisLabel("Grid size: "));
sizeTable.add(gridSizeField = new VisValidatableTextField(Validators.FLOATS));
prepareTable();
settingsTable.add(drawGridCheck = new VisCheckBox("Draw grid", config.drawGrid)).left();
settingsTable.row();
settingsTable.add(sizeTable);
gridSizeField.setTextFieldFilter(new FloatDigitsOnlyFilter(false));
gridSizeField.addValidator(new Validators.GreaterThanValidator(0));
gridSizeField.setText(NumberUtils.floatToString(config.gridSize));
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:17,代码来源:GridRendererSystem.java
示例3: buildTable
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
public void buildTable () {
prepareTable();
updateChannelSelectBox = new EnumSelectBox<>(UpdateChannelType.class, new PrettyEnumNameProvider<>());
updateChannelSelectBox.setSelectedEnum(config.updateChannel);
VisTable updateTable = new VisTable(true);
updateTable.add("Update channel:");
updateTable.add(updateChannelSelectBox);
VisImage updateHelpImage = new VisImage(Icons.QUESTION_BIG.drawable());
new Tooltip.Builder("Select update channel that will be used for update checking:\n" +
"Stable: The most stable builds, should be bug free in theory.\n" +
"Cutting Edge: Built after every single change, expect a lot of bugs and a lot of builds.", Align.left)
.target(updateHelpImage).build();
updateTable.add(updateHelpImage).size(22);
settingsTable.defaults().left();
settingsTable.add(confirmExitCheck = new VisCheckBox("Confirm exit", config.confirmExit)).row();
settingsTable.add(checkForUpdatesCheck = new VisCheckBox("Check for updates", config.checkForUpdates)).row();
settingsTable.add(updateTable).row();
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:23,代码来源:GeneralSettingsModule.java
示例4: update
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
private void update() {
content.clear();
content.add(new Table() {
{
add(WidgetUtils.tooltip("The skill's range, relative to a centered target."));
add(new VisLabel("Targets"));
}
}).row();
content.add(new Table() {
{
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 7; j++) {
final int x = i - CENTER_OFFSET;
final int y = j - CENTER_OFFSET;
add(new VisCheckBox("", isChecked(x, y)) {
{
addListener(new EventListener() {
@Override
public boolean handle(Event event) {
if (event instanceof ChangeEvent) {
setTarget(x, y, isChecked());
return true;
}
return false;
}
});
if (x == 0 && y == 0) {
setDebug(true);
setColor(Color.YELLOW);
setBackground(Drawables.get("blue"));
}
}
});
}
row();
}
}
});
}
开发者ID:adketuri,项目名称:umbracraft,代码行数:40,代码来源:SkillTargetingWidget.java
示例5: IconStack
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
public IconStack (VisImage icon, VisCheckBox checkBox) {
this.icon = icon;
this.checkBox = checkBox;
setTouchable(Touchable.childrenOnly);
addActor(icon);
addActor(checkBox);
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:8,代码来源:IconStack.java
示例6: buildTable
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
public void buildTable () {
prepareTable();
settingsTable.defaults().left();
settingsTable.add("This sections contains experimental editor\nsettings.\n\nEditor restart will be required to apply\nchanges.").row();
settingsTable.add(uiScaleCheck = new VisCheckBox("Enable 200% UI scaling\n(for high resolution displays)", config.uiScale)).row();
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:9,代码来源:ExperimentalSettingsModule.java
示例7: getNewInstanceOfTextButton
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
protected TextButton getNewInstanceOfTextButton(final TextLmlActorBuilder builder) {
return new VisCheckBox(builder.getText(), builder.getStyleName());
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:VisCheckBoxLmlTag.java
示例8: getComponentActors
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
protected Actor[] getComponentActors(final Actor actor) {
final VisCheckBox checkBox = (VisCheckBox) actor;
return new Actor[] { checkBox.getLabel(), checkBox.getBackgroundImage(), checkBox.getTickImage() };
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:VisCheckBoxLmlTag.java
示例9: getComponentActors
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
@Override
protected Actor[] getComponentActors(final Actor actor) {
final VisCheckBox checkBox = (VisCheckBox) actor;
return new Actor[] { checkBox.getLabel(), checkBox.getImage() };
}
开发者ID:gdx-libs,项目名称:gdx-lml-vis,代码行数:6,代码来源:VisCheckBoxLmlTag.java
示例10: setButtonStateInvalid
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
public void setButtonStateInvalid (boolean state) {
if (button instanceof VisCheckBox) {
((VisCheckBox) button).setStateInvalid(state);
}
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:6,代码来源:SimpleFormValidator.java
示例11: initUI
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
private void initUI () {
uiTable = new VisTable(true) {
@Override
public float getPrefHeight () {
return 120;
}
};
uiTable.setBackground(VisUI.getSkin().getDrawable("window-bg"));
uiTable.setTouchable(Touchable.enabled);
uiTable.top().left();
uiTable.defaults().expandX().fillX().left();
uiTable.add(new VisLabel("Polygon Tool", Align.center)).expandX().fillX().top();
uiTable.row();
statusLabel = new VisLabel();
statusLabel.setWrap(true);
statusLabel.setAlignment(Align.center);
buttonTable = new VisTable(true) {
@Override
public float getPrefHeight () {
if (isVisible())
return super.getPrefHeight();
else
return 0;
}
@Override
public void setVisible (boolean visible) {
super.setVisible(visible);
invalidateHierarchy();
}
};
VisTextButton makeDefaultButton;
buttonTable.setVisible(false);
buttonTable.add(makeDefaultButton = new VisTextButton("Set From Bounds")).row();
buttonTable.add(traceButton = new VisTextButton("Auto Trace")).row();
dynamicUpdateCheck = new VisCheckBox("Dynamic faces update", true);
uiTable.add(statusLabel).pad(0, 3, 0, 3).height(new VisValue(context -> statusLabel.isVisible() ? statusLabel.getPrefHeight() : 0)).spaceBottom(0).row();
uiTable.add(buttonTable).height(new VisValue(context -> buttonTable.isVisible() ? buttonTable.getPrefHeight() : 0)).spaceBottom(0).row();
uiTable.add().expand().fill().row();
uiTable.add(dynamicUpdateCheck).expand(false, false).fill(false, false).center().padBottom(3);
makeDefaultButton.addListener(new VisChangeListener((event, actor) -> makeDefaultPolygon()));
traceButton.addListener(new VisChangeListener((event, actor) -> {
EntityProxy entity = entityManipulator.getSelectedEntities().first();
VisAssetDescriptor assetDescriptor = entity.getComponent(AssetReference.class).getAsset();
if (assetDescriptor instanceof TextureAssetDescriptor == false) {
Dialogs.showOKDialog(stage, "Message", "Auto Trace can only be used with sprite entities");
return;
}
if (entity.getRotation() != 0) {
Optional<DisableableOptionDialog> dialog = disableableDialogs.showOptionDialog(DisableableDialogsModule.POLYGON_TOOL_ROTATED_UNSUPPORTED, DefaultDialogOption.YES, stage, "Warning",
"Auto tracer does not support rotated entities",
OptionDialogType.YES_CANCEL, new OptionDialogAdapter() {
@Override
public void yes () {
showAutoTracerDialog(entity, assetDescriptor);
}
});
dialog.ifPresent(optDialog -> optDialog.setYesButtonText("Continue Anyway"));
} else {
showAutoTracerDialog(entity, assetDescriptor);
}
}));
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:76,代码来源:PolygonTool.java
示例12: showOptionDialog
import com.kotcrab.vis.ui.widget.VisCheckBox; //导入依赖的package包/类
public Optional<DisableableOptionDialog> showOptionDialog (String dialogId, DefaultDialogOption defaultOption, Stage stage, String title, String text, OptionDialogType type, OptionDialogListener listener) {
if (disabledDialogs.contains(dialogId, false)) {
switch (defaultOption) {
case YES:
listener.yes();
break;
case NO:
listener.no();
break;
case CANCEL:
listener.cancel();
break;
}
return Optional.empty();
}
VisCheckBox dontShowAgain = new VisCheckBox("Don't show again");
OptionDialogListener wrapperListener = new OptionDialogListener() {
@Override
public void yes () {
checkIfDontShowAgainChecked();
listener.yes();
}
@Override
public void no () {
checkIfDontShowAgainChecked();
listener.no();
}
@Override
public void cancel () {
checkIfDontShowAgainChecked();
listener.cancel();
}
private void checkIfDontShowAgainChecked () {
if (dontShowAgain.isChecked()) {
disabledDialogs.add(dialogId);
saveConfig();
}
}
};
DisableableOptionDialog dialog = new DisableableOptionDialog(title, text, type, wrapperListener, dontShowAgain);
stage.addActor(dialog.fadeIn());
return Optional.of(dialog);
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:50,代码来源:DisableableDialogsModule.java
注:本文中的com.kotcrab.vis.ui.widget.VisCheckBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论