use of com.kotcrab.vis.ui.widget.VisImageTextButton in project vis-ui by kotcrab.
the class TestGenerateDisabledImage method addVisWidgets.
private void addVisWidgets() {
Drawable icon = VisUI.getSkin().getDrawable("icon-folder");
VisImageButton normal = new VisImageButton(icon);
VisImageButton disabled = new VisImageButton(icon);
disabled.setGenerateDisabledImage(true);
disabled.setDisabled(true);
add(new VisLabel("VisImageButton normal"));
add(normal).row();
add(new VisLabel("VisImageButton disabled"));
add(disabled).row();
VisImageTextButton normalText = new VisImageTextButton("text", icon);
VisImageTextButton disabledText = new VisImageTextButton("text", icon);
disabledText.setGenerateDisabledImage(true);
disabledText.setDisabled(true);
add(new VisLabel("VisImageTextButton normal"));
add(normalText).row();
add(new VisLabel("VisImageTextButton disabled"));
add(disabledText).padBottom(3f).row();
}
use of com.kotcrab.vis.ui.widget.VisImageTextButton in project HyperLap2D by rednblackgames.
the class UICompositeHierarchy method addItem.
public void addItem(String name, Integer id, boolean isRoot) {
String classType = "hierarchy-item";
if (isRoot)
classType += "-root";
VisImageTextButton button = StandardWidgetsFactory.createImageTextButton(name, classType);
button.getLabelCell().padLeft(3);
button.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
facade.sendNotification(SWITCH_VIEW_COMPOSITE_CLICKED, id);
}
});
button.padLeft(5).padRight(3);
if (!isRoot)
mainGroup.addActor(new Image(VisUI.getSkin(), "hierarchy-separator"));
else
button.padLeft(10);
mainGroup.addActor(button);
}
Aggregations