Search in sources :

Example 6 with VisLabel

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

the class PerformancePanel method initView.

public void initView() {
    mainTable.clear();
    entitiesCount = new VisLabel();
    fpsLbl = new VisLabel();
    memoryLabel = new VisLabel();
    glCalls = new VisLabel();
    drawCalls = new VisLabel();
    shaderSwitch = new VisLabel();
    textureBind = new VisLabel();
    vertexCount = new VisLabel();
    mainTable.add(new VisLabel("Entity count: ")).right();
    mainTable.add(entitiesCount).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("FPS: ")).right();
    mainTable.add(fpsLbl).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("Memory: ")).right();
    mainTable.add(memoryLabel).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("GL Calls: ")).right();
    mainTable.add(glCalls).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("Draw calls: ")).right();
    mainTable.add(drawCalls).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("Shader switches: ")).right();
    mainTable.add(shaderSwitch).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("Texture bindings: ")).right();
    mainTable.add(textureBind).left().padLeft(4);
    mainTable.row();
    mainTable.add(new VisLabel("Vertex count: ")).right();
    mainTable.add(vertexCount).left().padLeft(4);
    mainTable.row();
    pack();
}
Also used : VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 7 with VisLabel

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

the class UIShaderProperties method initView.

public void initView(HashMap<String, ShaderProgram> shaders) {
    mainTable.clear();
    Array<String> shaderNames = new Array<>();
    shaderNames.add("Default");
    shaders.keySet().forEach(shaderNames::add);
    shadersSelector.setItems(shaderNames);
    mainTable.add(new VisLabel("Shader: ", Align.right)).padRight(5).width(75).right();
    mainTable.add(shadersSelector).width(100).left().row();
    TextButton editButton = StandardWidgetsFactory.createTextButton("Edit");
    editButton.addListener(new ButtonToNotificationListener(EDIT_BUTTON_CLICKED));
    mainTable.add(editButton).padTop(5).padRight(3);
    TextButton uniformsButton = StandardWidgetsFactory.createTextButton("Uniforms");
    uniformsButton.addListener(new ButtonToNotificationListener(UNIFORMS_BUTTON_CLICKED));
    mainTable.add(uniformsButton).padTop(5).row();
    mainTable.addSeparator().padTop(5).padBottom(5).colspan(2);
    mainTable.add(StandardWidgetsFactory.createLabel("Rendering Layer:")).padRight(5).right();
    mainTable.add(renderingLaterSelector).width(100).left().row();
}
Also used : Array(com.badlogic.gdx.utils.Array) TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) ButtonToNotificationListener(games.rednblack.editor.event.ButtonToNotificationListener) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 8 with VisLabel

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

the class UIPolygonComponentProperties method initEmptyView.

public void initEmptyView() {
    mainTable.clear();
    addDefaultMeshButton = StandardWidgetsFactory.createTextButton("Make Default");
    addAutoTraceMeshButton = StandardWidgetsFactory.createTextButton("Auto Trace");
    mainTable.add(new VisLabel("There is no vertices in this shape", Align.center));
    mainTable.row();
    mainTable.add(addDefaultMeshButton).center().row();
    mainTable.add(addAutoTraceMeshButton).center().padTop(5).row();
    initEmptyViewListeners();
}
Also used : VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 9 with VisLabel

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

the class ProjectExportSettings method getFilterTable.

private Table getFilterTable() {
    String[] data = { "Linear", "Nearest", "MipMap", "MipMapNearestNearest", "MipMapLinearNearest", "MipMapNearestLinear", "MipMapLinearLinear" };
    VisTable filterTable = new VisTable();
    filterMagSelectBox.setItems(data);
    filterTable.add(new VisLabel("Mag:")).left().padRight(3);
    filterTable.add(filterMagSelectBox).width(85).height(21).padRight(3);
    filterTable.row().padTop(10);
    filterMinSelectBox.setItems(data);
    filterTable.add(new VisLabel("Min:")).left().padRight(3);
    filterTable.add(filterMinSelectBox).width(85).height(21).left();
    return filterTable;
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable) VisLabel(com.kotcrab.vis.ui.widget.VisLabel)

Example 10 with VisLabel

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

the class GraphBoxImpl method addTwoSideGraphPart.

public void addTwoSideGraphPart(GraphNodeInput graphNodeInput, GraphNodeOutput graphNodeOutput) {
    VisTable table = new VisTable();
    table.add(new VisLabel(graphNodeInput.getFieldName())).grow();
    VisLabel outputLabel = new VisLabel(graphNodeOutput.getFieldName());
    outputLabel.setAlignment(Align.right);
    table.add(outputLabel).grow();
    table.row();
    GraphBoxPartImpl graphBoxPart = new GraphBoxPartImpl(table, null);
    graphBoxPart.setInputConnector(GraphBoxInputConnector.Side.Left, graphNodeInput);
    graphBoxPart.setOutputConnector(GraphBoxOutputConnector.Side.Right, graphNodeOutput);
    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