Search in sources :

Example 1 with GuidePageWidget

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);
}
Also used : JsonObject(com.google.gson.JsonObject) GuidePageWidget(gregtech.common.terminal.app.guide.widget.GuidePageWidget)

Aggregations

JsonObject (com.google.gson.JsonObject)1 GuidePageWidget (gregtech.common.terminal.app.guide.widget.GuidePageWidget)1