use of com.kotcrab.vis.ui.widget.VisSplitPane in project talos by rockbite.
the class UIStage method constructSplitPanes.
private void constructSplitPanes() {
Table layoutContainer = new Table();
mainLayout = new Table();
customLayout = new Table();
customLayout.setVisible(false);
Stack stack = new Stack(mainLayout, customLayout);
layoutContainer.add(stack).grow();
previewWidget = new PreviewWidget();
emitterList = new EmitterList(skin);
Table midTable = new Table();
bottomTable = new Table();
bottomTable.setSkin(skin);
bottomTable.setBackground(skin.getDrawable("button-main-menu"));
bottomContainer = new Table();
Table libraryContainer = new Table();
libraryContainer.addListener(new // Quick hack for library container intercepting touch as its an empty table currently
ClickListener(// Quick hack for library container intercepting touch as its an empty table currently
0) {
@Override
public void clicked(InputEvent event, float x, float y) {
}
});
libraryContainer.addListener(new // Quick hack for library container intercepting touch as its an empty table currently
ClickListener(// Quick hack for library container intercepting touch as its an empty table currently
1) {
@Override
public void clicked(InputEvent event, float x, float y) {
}
});
libraryContainer.setTouchable(Touchable.enabled);
bottomPane = new VisSplitPane(bottomContainer, libraryContainer, false);
// remove this line when the bottom-right panel content will be implemented (which is the library container)
bottomPane.setSplitAmount(1f);
bottomContainer.add(emitterList).grow().expand().fill();
bottomTable.add(bottomPane).expand().grow();
verticalPane = new VisSplitPane(midTable, bottomTable, true);
verticalPane.setMaxSplitAmount(0.70f);
verticalPane.setMinSplitAmount(0.3f);
verticalPane.setSplitAmount(0.7f);
leftTable = new Table();
leftTable.setSkin(skin);
leftTable.add(previewWidget).grow();
rightTable = new Table();
rightTable.setSkin(skin);
rightTable.add().grow();
horizontalPane = new VisSplitPane(leftTable, rightTable, false);
midTable.add(horizontalPane).expand().grow().fill();
horizontalPane.setMaxSplitAmount(0.8f);
horizontalPane.setMinSplitAmount(0.2f);
horizontalPane.setSplitAmount(0.3f);
fullScreenTable.row();
fullScreenTable.add(layoutContainer).grow();
mainLayout.add(verticalPane).grow();
}
use of com.kotcrab.vis.ui.widget.VisSplitPane in project talos by rockbite.
the class SceneEditorAddon method makeLayout.
private void makeLayout(Table container) {
Skin skin = TalosMain.Instance().getSkin();
Table leftPart = new Table();
Table midPart = new Table();
workspaceContainer = new Table();
VisSplitPane horizontalPane = new VisSplitPane(leftPart, propertyPanel, false);
VisSplitPane verticalPane = new VisSplitPane(midPart, projectExplorer, true);
VisSplitPane midPane = new VisSplitPane(hierarchy, workspaceContainer, false);
leftPart.add(verticalPane).grow();
midPart.add(midPane).grow();
horizontalPane.setSplitAmount(0.8f);
verticalPane.setSplitAmount(0.72f);
midPane.setSplitAmount(0.25f);
Drawable workspaceBg = ColorLibrary.obtainBackground(skin, ColorLibrary.BackgroundColor.RED);
Drawable panelBg = ColorLibrary.obtainBackground(skin, ColorLibrary.BackgroundColor.SUPER_DARK_GRAY);
workspaceContainer.setBackground(workspaceBg);
propertyPanel.setBackground(panelBg);
hierarchy.setBackground(panelBg);
projectExplorer.setBackground(panelBg);
workspaceContainer.add(workspace).grow();
container.add(horizontalPane).grow();
}
use of com.kotcrab.vis.ui.widget.VisSplitPane in project vis-ui by kotcrab.
the class TestSplitPane method addVisWidgets.
private void addVisWidgets() {
VisLabel label = new VisLabel("Lorem \nipsum \ndolor \nsit \namet");
VisLabel label2 = new VisLabel("Consectetur \nadipiscing \nelit");
VisTable table = new VisTable(true);
VisTable table2 = new VisTable(true);
table.add(label);
table2.add(label2);
VisSplitPane splitPane = new VisSplitPane(table, table2, vertical);
add(splitPane).fill().expand();
}
Aggregations