This commit is contained in:
Anuken
2019-10-23 16:04:19 -04:00
parent b7c1660b07
commit f1a423f8fb
3 changed files with 10 additions and 4 deletions

View File

@@ -40,10 +40,15 @@ public class TechTreeDialog extends FloatingDialog{
titleTable.remove();
margin(0f).marginBottom(8);
cont.stack(view = new View(), items = new ItemsDisplay()).grow();
Stack stack = cont.stack(view = new View(), items = new ItemsDisplay()).grow().get();
Events.on(ContentReloadEvent.class, e -> {
nodes.clear();
root = new TechTreeNode(TechTree.root, null);
checkNodes(root);
treeLayout();
stack.getChildren().get(0).remove();
stack.addChildAt(0, view = new View());
});
shown(() -> {
@@ -357,7 +362,6 @@ public class TechTreeDialog extends FloatingDialog{
infoTable.table(t -> t.margin(3f).left().labelWrap(node.block.description).color(Color.lightGray).growX()).fillX();
}
addChild(infoTable);
infoTable.pack();
infoTable.act(Core.graphics.getDeltaTime());