package com.mygdx.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.viewport.ScreenViewport; import com.kotcrab.vis.ui.VisUI; import com.kotcrab.vis.ui.layout.GridGroup; import com.kotcrab.vis.ui.widget.MultiSplitPane; import com.kotcrab.vis.ui.widget.VisDialog; import com.kotcrab.vis.ui.widget.VisLabel; import com.kotcrab.vis.ui.widget.VisTable; import com.kotcrab.vis.ui.widget.VisTextButton; import com.kotcrab.vis.ui.widget.tabbedpane.Tab; import com.kotcrab.vis.ui.widget.tabbedpane.TabbedPane; import javax.swing.plaf.multi.MultiSplitPaneUI; public class MyGdxGame extends ApplicationAdapter { private Stage stage; @Override public void create () { VisUI.load(); stage = new Stage(new ScreenViewport()); Gdx.input.setInputProcessor(stage); VisTable container = new VisTable(); container.setFillParent(true); stage.addActor(container); // left VisTable table1 = new VisTable(); VisTable c0 = new VisTable(); c0.add(new VisLabel("table 1")).expandX().fillX().row(); c0.setBackground("window-bg"); table1.add(c0).expandX().fillX().pad(10).row(); // middle VisTable table2 = new VisTable(); VisTable c1 = new VisTable(); c1.add(new VisLabel("table 2")).expandX().fillX().row(); c1.setBackground("window-bg"); table2.add(c1).expandX().fillX().pad(10).row(); // right; this contains the GridGroup VisTable table3 = new VisTable(); VisTable c2 = new VisTable(); c2.setBackground("window-bg"); GridGroup grid = new GridGroup(40, 0); grid.addActor(new VisLabel("a")); grid.addActor(new VisLabel("b")); grid.addActor(new VisLabel("c")); grid.addActor(new VisLabel("d")); c2.add(grid).expandX().fillX().row(); table3.add(c2).expandX().fillX().pad(10).row(); MultiSplitPane splitPane = new MultiSplitPane(false); splitPane.setWidgets(table1, table2, table3); container.add(splitPane).expand().fill().row(); } @Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.act(); stage.draw(); } }