Search in sources :

Example 21 with VisLabel

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

the class ProjectExportSettings method getDimensionsTable.

private Table getDimensionsTable() {
    Integer[] data = { 512, 1024, 2048, 4096 };
    VisTable dimensionsTable = new VisTable();
    widthSelectBox.setItems(data);
    dimensionsTable.add(new VisLabel("Width:")).left().padRight(3);
    dimensionsTable.add(widthSelectBox).width(85).height(21).padRight(3);
    dimensionsTable.row().padTop(10);
    heightSelectBox.setItems(data);
    dimensionsTable.add(new VisLabel("Height:")).left().padRight(3);
    dimensionsTable.add(heightSelectBox).width(85).height(21).left();
    return dimensionsTable;
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 22 with VisLabel

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

the class AbstractGridTilesTab method initView.

@Override
public void initView() {
    if (isDrop = savedTiles.size == 0) {
        VisImageButton.VisImageButtonStyle dropBoxStyle = new VisImageButton.VisImageButtonStyle();
        dropBoxStyle.up = new TextureRegionDrawable(resourcesManager.getTextureRegion("tiles-drop-here-normal", -1));
        dropBoxStyle.imageOver = new TextureRegionDrawable(resourcesManager.getTextureRegion("tiles-drop-here-over", -1));
        VisImageButton dropRegion = new VisImageButton(dropBoxStyle);
        content.clear();
        content.add(dropRegion).center().padRight(6).padBottom(6).padTop(10).row();
        content.add(new VisLabel("Drop an image from resources box")).expandX().center().padBottom(5);
        content.pack();
    } else {
        if (tileIndex > tilesCount) {
            tilesCount = tileIndex;
        }
        initTiles();
    }
}
Also used : VisImageButton(com.kotcrab.vis.ui.widget.VisImageButton) TextureRegionDrawable(com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 23 with VisLabel

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

the class MainPanel method initPreView.

private void initPreView() {
    previewTable.clear();
    previewWidget = new PreviewWidget();
    previewWidget.setHeight(205);
    previewTable.add(previewWidget).width(200).height(205).top();
    previewTable.row();
    previewWidget.update((TextureAtlas.AtlasRegion) texture, ((TextureAtlas.AtlasRegion) texture).findValue("split"));
    VisLabel label = new VisLabel("Note: after saving, your \n scene will reload to \n apply changes.");
    label.setAlignment(Align.center);
    previewTable.add(label).pad(10).fillY().expandY();
    previewTable.row();
    VisTextButton saveBtn = new VisTextButton("apply and save");
    previewTable.add(saveBtn).pad(5);
    previewTable.row();
    saveBtn.addListener(new ClickListener() {

        public void clicked(InputEvent event, float x, float y) {
            facade.sendNotification(SAVE_CLICKED);
        }
    });
}
Also used : VisTextButton(com.kotcrab.vis.ui.widget.VisTextButton) TextureAtlas(com.badlogic.gdx.graphics.g2d.TextureAtlas) VisLabel(com.kotcrab.vis.ui.widget.VisLabel) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Example 24 with VisLabel

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

the class ImportPanel method setImportingView.

public void setImportingView(int type, int count) {
    mainTable.clear();
    errorLabel.getColor().a = 0;
    errorLabel.clearActions();
    String typeText = typeNames.get(type);
    if (count > 1)
        typeText += " (" + count + ")";
    mainTable.add(new VisLabel("Currently importing: " + typeText)).left();
    mainTable.row().padBottom(5);
    progressBar = new VisProgressBar(0, 100, 1, false);
    mainTable.add(progressBar).fillX().padTop(5).width(250);
    mainTable.row().padBottom(5);
    pack();
}
Also used : VisProgressBar(com.kotcrab.vis.ui.widget.VisProgressBar) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 25 with VisLabel

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

the class GraphBoxImpl method addInputGraphPart.

public void addInputGraphPart(GraphNodeInput graphNodeInput) {
    VisTable table = new VisTable();
    table.add(new VisLabel(graphNodeInput.getFieldName())).grow().row();
    GraphBoxPartImpl graphBoxPart = new GraphBoxPartImpl(table, null);
    graphBoxPart.setInputConnector(GraphBoxInputConnector.Side.Left, graphNodeInput);
    addGraphBoxPart(graphBoxPart);
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable) 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