Search in sources :

Example 21 with VisTable

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

the class BasicColorPicker method createUI.

protected void createUI() {
    mainTable = new VisTable(true);
    colorPreviewsTable = createColorsPreviewTable();
    hexTable = createHexTable();
    rebuildMainTable();
    add(mainTable).top();
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable)

Example 22 with VisTable

use of com.kotcrab.vis.ui.widget.VisTable 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 23 with VisTable

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

the class BoxItemResourceSelectionUIMediator method setSelectionBetween.

private void setSelectionBetween(BoxItemResource boxResourceStart, BoxItemResource boxResourceEnd, boolean selected) {
    VisTable boxesTable = getBoxResourceTable(boxResourceStart);
    if (boxesTable == null)
        return;
    int startIndex = getCellIndex(boxResourceStart, 0, boxesTable);
    int endIndex = getCellIndex(boxResourceEnd, boxesTable.getCells().size - 1, boxesTable);
    // we want to start with start :)
    if (endIndex < startIndex) {
        int tmp = startIndex;
        startIndex = endIndex;
        endIndex = tmp;
    }
    for (int i = startIndex; i <= endIndex; i++) {
        Cell<BoxItemResource> cell = boxesTable.getCells().get(i);
        BoxItemResource boxResource = cell.getActor();
        setSelected(boxResource, selected);
    }
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable) BoxItemResource(games.rednblack.editor.view.ui.box.resourcespanel.draggable.box.BoxItemResource)

Example 24 with VisTable

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

the class UIMainTable method initRightBoxesPanel.

private void initRightBoxesPanel() {
    VisTable rightPanel = new VisTable();
    // PropertyBox
    UIMultiPropertyBoxMediator multiPropertyBoxMediator = facade.retrieveMediator(UIMultiPropertyBoxMediator.NAME);
    UIMultiPropertyBox multiPropertyBox = multiPropertyBoxMediator.getViewComponent();
    rightPanel.add(multiPropertyBox).top();
    rightPanel.row();
    // ResourcesBox
    UIResourcesBoxMediator resourceBoxMediator = facade.retrieveMediator(UIResourcesBoxMediator.NAME);
    UIResourcesBox resourceBox = resourceBoxMediator.getViewComponent();
    rightPanel.add(resourceBox).top();
    rightPanel.row();
    // LayerBox
    UILayerBoxMediator layerBoxMediator = facade.retrieveMediator(UILayerBoxMediator.NAME);
    UILayerBox layerBox = layerBoxMediator.getViewComponent();
    rightPanel.add(layerBox).top();
    middleTable.add(rightPanel).top().right().expand().padTop(15);
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable)

Example 25 with VisTable

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

the class UIMainTable method initLeftBoxesPanel.

private void initLeftBoxesPanel() {
    // Align
    VisTable leftBoxesPanel = new VisTable();
    UIAlignBoxMediator uiAlignBoxMediator = facade.retrieveMediator(UIAlignBoxMediator.NAME);
    UIAlignBox uiAlignBox = uiAlignBoxMediator.getViewComponent();
    leftBoxesPanel.add(uiAlignBox).expandX().fillX();
    leftBoxesPanel.row();
    // TreeView
    UIItemsTreeBoxMediator uiItemsTreeBoxMediator = facade.retrieveMediator(UIItemsTreeBoxMediator.NAME);
    UIItemsTreeBox itemsBox = uiItemsTreeBoxMediator.getViewComponent();
    leftBoxesPanel.add(itemsBox).width(180).fillX().maxHeight(620).top();
    middleTable.add(leftBoxesPanel).top().left().expand().padTop(15).padLeft(16);
}
Also used : VisTable(com.kotcrab.vis.ui.widget.VisTable)

Aggregations

VisTable (com.kotcrab.vis.ui.widget.VisTable)35 VisLabel (com.kotcrab.vis.ui.widget.VisLabel)11 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)7 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)7 Actor (com.badlogic.gdx.scenes.scene2d.Actor)6 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)6 VisImageButton (com.kotcrab.vis.ui.widget.VisImageButton)6 JsonValue (com.badlogic.gdx.utils.JsonValue)4 TextureRegionDrawable (com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable)3 GraphBoxImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl)3 GraphBoxPartImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxPartImpl)3 VisSelectBox (com.kotcrab.vis.ui.widget.VisSelectBox)3 Color (com.badlogic.gdx.graphics.Color)2 Image (com.badlogic.gdx.scenes.scene2d.ui.Image)2 ClampMethod (com.gempukku.libgdx.graph.shader.ClampMethod)2 GraphChangedEvent (com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent)2 VisProgressBar (com.kotcrab.vis.ui.widget.VisProgressBar)2 VisSlider (com.kotcrab.vis.ui.widget.VisSlider)2 VisSplitPane (com.kotcrab.vis.ui.widget.VisSplitPane)2 VisTextButton (com.kotcrab.vis.ui.widget.VisTextButton)2