use of gregtech.common.terminal.app.guide.widget.GuidePageWidget in project GregTech by GregTechCEu.
the class GuideApp method loadPage.
protected void loadPage(TreeNode<String, T> leaf) {
if (leaf == null) {
return;
}
if (this.pageWidget != null) {
this.removeWidget(this.pageWidget);
}
this.pageWidget = new GuidePageWidget(getOs().getSize().width - 200, 0, 200, getOs().getSize().height, 5);
if (leaf.isLeaf() && leaf.getContent() != null) {
JsonObject page = jsonObjectMap.get(leaf.getContent());
if (page != null) {
this.pageWidget.loadJsonConfig(page);
}
}
this.addWidget(this.pageWidget);
this.onOSSizeUpdate(getOs().getSize().width, getOs().getSize().height);
}
Aggregations