The libgdx-inGameConsole-utils is a utility library for StrongJoshua's libgdx-inGameConsole library.
To use this library in your gradle project, add the version number and jitpack repository information to your root build.gradle file:
allprojects {
ext {
...
inGameConsoleUtils = '1.0.0'
}
repositories {
...
maven { url 'https://jitpack.io' }
}
}
And add the dependency in your core project:
dependencies {
implementation "com.github.Dgzt:libgdx-inGameConsole-utils:$inGameConsoleUtils"
}
Create GUIConsole object with this library's skin:
GUIConsole console = new GUIConsole(new Skin(Gdx.files.classpath("console_utils_skin/uiskin.json")));
ConsoleTable consoleTable = new ConsoleTable();
consoleTable.setHeaders("Header 1", "Header 2", "Header 3");
consoleTable.addRow("Row 11", "Row 12", "Row 13");
consoleTable.addRow("Row 21", "Row 22", "Row 23");
consoleTable.print(console);
ConsoleTable consoleTable = new ConsoleTable();
consoleTable.addRow("Row 11", "Row 12", "Row 13");
consoleTable.addRow("Row 21", "Row 22", "Row 23");
consoleTable.addRow("Row 31", "Extra length row", "Row 33");
consoleTable.print(console);
ConsoleTree consoleTree = new ConsoleTree();
TreeNode line1 = consoleTree.addRow("Line 1");
consoleTree.addRow(line1, "Inner line 11");
TreeNode line12 = consoleTree.addRow(line1, "Inner line 12");
TreeNode line121 = consoleTree.addRow(line12, "Inner line 121");
consoleTree.addRow(line121, "Inner line 1211");
consoleTree.addRow(line1, "Inner line 13");
consoleTree.addRow("Line 2");
consoleTree.print(console);