Search in sources :

Example 1 with ButtonBar

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

the class ColorPicker method createButtons.

private VisTable createButtons() {
    ButtonBar buttonBar = new ButtonBar();
    buttonBar.setIgnoreSpacing(true);
    buttonBar.setButton(ButtonType.LEFT, restoreButton = new VisTextButton(RESTORE.get()));
    buttonBar.setButton(ButtonType.OK, okButton = new VisTextButton(OK.get()));
    buttonBar.setButton(ButtonType.CANCEL, cancelButton = new VisTextButton(CANCEL.get()));
    return buttonBar.createTable();
}
Also used : VisTextButton(com.kotcrab.vis.ui.widget.VisTextButton) ButtonBar(com.kotcrab.vis.ui.widget.ButtonBar)

Example 2 with ButtonBar

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

the class TestButtonBar method createTable.

private VisTable createTable(String order) {
    ButtonBar buttonBar = new ButtonBar(order);
    ChangeListener dummyListener = new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
        }
    };
    buttonBar.setButton(ButtonType.LEFT, dummyListener);
    buttonBar.setButton(ButtonType.RIGHT, dummyListener);
    buttonBar.setButton(ButtonType.HELP, dummyListener);
    buttonBar.setButton(ButtonType.NO, dummyListener);
    buttonBar.setButton(ButtonType.YES, dummyListener);
    buttonBar.setButton(ButtonType.CANCEL, dummyListener);
    buttonBar.setButton(ButtonType.BACK, dummyListener);
    buttonBar.setButton(ButtonType.NEXT, dummyListener);
    buttonBar.setButton(ButtonType.APPLY, dummyListener);
    buttonBar.setButton(ButtonType.FINISH, dummyListener);
    buttonBar.setButton(ButtonType.OK, dummyListener);
    return buttonBar.createTable();
}
Also used : ButtonBar(com.kotcrab.vis.ui.widget.ButtonBar) Actor(com.badlogic.gdx.scenes.scene2d.Actor) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)

Aggregations

ButtonBar (com.kotcrab.vis.ui.widget.ButtonBar)2 Actor (com.badlogic.gdx.scenes.scene2d.Actor)1 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)1 VisTextButton (com.kotcrab.vis.ui.widget.VisTextButton)1