Search in sources :

Example 11 with VisTextButton

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

the class UILivePreviewBox method init.

private void init() {
    addSeparator(true).padRight(13).padLeft(13);
    VisTextButton liveButton = StandardWidgetsFactory.createTextButton("Live Preview", "red");
    add(liveButton).width(110);
    liveButton.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            facade.sendNotification(LIVE_PREVIEW_CLICKED);
        }
    });
}
Also used : VisTextButton(com.kotcrab.vis.ui.widget.VisTextButton) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Example 12 with VisTextButton

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

the class EditSpriteAnimationPanel method createNewAnimationTable.

private void createNewAnimationTable(int maxFrame) {
    newAnimationTable.clear();
    nameField = StandardWidgetsFactory.createValidableTextField(new EmptyOrDefaultValidator());
    fromFrameField = StandardWidgetsFactory.createNumberSelector(0, maxFrame);
    toFrameField = StandardWidgetsFactory.createNumberSelector(0, maxFrame);
    addButton = new VisTextButton("Add");
    newAnimationTable.add(nameField).width(120);
    newAnimationTable.add(fromFrameField).padLeft(5);
    newAnimationTable.add(toFrameField).padLeft(5);
    newAnimationTable.add(addButton).padLeft(7).padRight(3);
    newAnimationTable.row();
    initListeners();
}
Also used : VisTextButton(com.kotcrab.vis.ui.widget.VisTextButton) EmptyOrDefaultValidator(games.rednblack.editor.view.ui.validator.EmptyOrDefaultValidator)

Aggregations

VisTextButton (com.kotcrab.vis.ui.widget.VisTextButton)12 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)8 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)8 VisLabel (com.kotcrab.vis.ui.widget.VisLabel)3 TextureAtlas (com.badlogic.gdx.graphics.g2d.TextureAtlas)2 Actor (com.badlogic.gdx.scenes.scene2d.Actor)2 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)2 Array (com.badlogic.gdx.utils.Array)2 VisTable (com.kotcrab.vis.ui.widget.VisTable)2 AttributeVO (games.rednblack.editor.plugin.tiled.data.AttributeVO)2 CategoryVO (games.rednblack.editor.plugin.tiled.data.CategoryVO)2 Category (games.rednblack.editor.plugin.tiled.view.Category)2 InputMultiplexer (com.badlogic.gdx.InputMultiplexer)1 OrthographicCamera (com.badlogic.gdx.graphics.OrthographicCamera)1 Texture (com.badlogic.gdx.graphics.Texture)1 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)1 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 ShapeRenderer (com.badlogic.gdx.graphics.glutils.ShapeRenderer)1 Vector2 (com.badlogic.gdx.math.Vector2)1 Stage (com.badlogic.gdx.scenes.scene2d.Stage)1