Search in sources :

Example 16 with VisLabel

use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.

the class TestTree method addVisWidgets.

private void addVisWidgets() {
    VisTree tree = new VisTree();
    TestNode item1 = new TestNode(new VisLabel("item 1"));
    TestNode item2 = new TestNode(new VisLabel("item 2"));
    TestNode item3 = new TestNode(new VisLabel("item 3"));
    item1.add(new TestNode(new VisLabel("item 1.1")));
    item1.add(new TestNode(new VisLabel("item 1.2")));
    item1.add(new TestNode(new VisLabel("item 1.3")));
    item2.add(new TestNode(new VisLabel("item 2.1")));
    item2.add(new TestNode(new VisLabel("item 2.2")));
    item2.add(new TestNode(new VisLabel("item 2.3")));
    item3.add(new TestNode(new VisLabel("item 3.1")));
    item3.add(new TestNode(new VisLabel("item 3.2")));
    item3.add(new TestNode(new VisLabel("item 3.3")));
    item1.setExpanded(true);
    tree.add(item1);
    tree.add(item2);
    tree.add(item3);
    add(tree).expand().fill();
}
Also used : VisLabel(com.kotcrab.vis.ui.widget.VisLabel) VisTree(com.kotcrab.vis.ui.widget.VisTree)

Example 17 with VisLabel

use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.

the class TestBusyBar method addVisWidgets.

private void addVisWidgets() {
    BusyBar busyBar = new BusyBar();
    add(busyBar).top().space(0).growX().row();
    add(new VisLabel("Working...", Align.center)).grow().center();
}
Also used : BusyBar(com.kotcrab.vis.ui.widget.BusyBar) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 18 with VisLabel

use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.

the class BasicColorPicker method createHexTable.

private VisTable createHexTable() {
    VisTable table = new VisTable(true);
    table.add(new VisLabel(HEX.get()));
    table.add(hexField = new VisValidatableTextField("00000000")).width(HEX_FIELD_WIDTH * sizes.scaleFactor);
    table.row();
    hexField.setMaxLength(HEX_COLOR_LENGTH);
    hexField.setProgrammaticChangeEvents(false);
    hexField.setTextFieldFilter(new TextFieldFilter() {

        @Override
        public boolean acceptChar(VisTextField textField, char c) {
            return Character.isDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
        }
    });
    hexField.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
            if (hexField.getText().length() == (allowAlphaEdit ? HEX_COLOR_LENGTH_WITH_ALPHA : HEX_COLOR_LENGTH)) {
                setColor(Color.valueOf(hexField.getText()), false);
            }
        }
    });
    return table;
}
Also used : VisTextField(com.kotcrab.vis.ui.widget.VisTextField) VisTable(com.kotcrab.vis.ui.widget.VisTable) Actor(com.badlogic.gdx.scenes.scene2d.Actor) TextFieldFilter(com.kotcrab.vis.ui.widget.VisTextField.TextFieldFilter) VisLabel(com.kotcrab.vis.ui.widget.VisLabel) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) VisValidatableTextField(com.kotcrab.vis.ui.widget.VisValidatableTextField)

Example 19 with VisLabel

use of com.kotcrab.vis.ui.widget.VisLabel in project vis-ui by kotcrab.

the class SimpleListAdapter method createView.

@Override
protected VisTable createView(ItemT item) {
    VisTable table = new VisTable();
    table.left();
    table.add(new VisLabel(item.toString()));
    return table;
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 20 with VisLabel

use of com.kotcrab.vis.ui.widget.VisLabel in project HyperLap2D by rednblackgames.

the class UIPolygonComponentProperties method initView.

public void initView() {
    mainTable.clear();
    verticesCountLbl = new VisLabel("", Align.left);
    copyBtn = new VisTextButton("Copy");
    pasteBtn = new VisTextButton("Paste");
    openEndedCheckbox = StandardWidgetsFactory.createCheckBox("Open Ended");
    mainTable.add(new VisLabel("Vertices: ", Align.left)).left().padRight(3);
    mainTable.add(verticesCountLbl).left().width(67);
    mainTable.add(copyBtn).right().padRight(4);
    mainTable.add(pasteBtn).right().padRight(4);
    mainTable.row();
    mainTable.add(openEndedCheckbox).left().colspan(4).padTop(5).row();
    initListeners();
}
Also used : VisTextButton(com.kotcrab.vis.ui.widget.VisTextButton) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Aggregations

VisLabel (com.kotcrab.vis.ui.widget.VisLabel)28 VisTable (com.kotcrab.vis.ui.widget.VisTable)10 Actor (com.badlogic.gdx.scenes.scene2d.Actor)4 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)4 JsonValue (com.badlogic.gdx.utils.JsonValue)4 VisValidatableTextField (com.kotcrab.vis.ui.widget.VisValidatableTextField)4 HorizontalGroup (com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup)3 TextureRegionDrawable (com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable)3 VisTextButton (com.kotcrab.vis.ui.widget.VisTextButton)3 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)2 Image (com.badlogic.gdx.scenes.scene2d.ui.Image)2 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)2 VisImageButton (com.kotcrab.vis.ui.widget.VisImageButton)2 Color (com.badlogic.gdx.graphics.Color)1 Batch (com.badlogic.gdx.graphics.g2d.Batch)1 TextureAtlas (com.badlogic.gdx.graphics.g2d.TextureAtlas)1 Vector2 (com.badlogic.gdx.math.Vector2)1 TextButton (com.badlogic.gdx.scenes.scene2d.ui.TextButton)1 BaseDrawable (com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable)1 Drawable (com.badlogic.gdx.scenes.scene2d.utils.Drawable)1