use of gregtech.api.terminal.gui.widgets.MachineSceneWidget in project GregTech by GregTechCEu.
the class ConsoleApp method initApp.
@Override
public AbstractApplication initApp() {
if (getMTE() == null) {
// 333 232
TerminalDialogWidget.showInfoDialog(os, "terminal.dialog.notice", "terminal.console.notice", () -> os.closeApplication(this, isClient)).open();
return this;
}
MachineConsoleWidget consoleWidget = new MachineConsoleWidget(200, 16, 133, 200);
this.addWidget(consoleWidget);
if (isClient) {
this.addWidget(0, new MachineSceneWidget(0, 16, 200, 200, os.clickPos).setOnSelected(consoleWidget::setFocus));
this.addWidget(new ImageWidget(0, 0, 333, 16, GuiTextures.UI_FRAME_SIDE_UP));
this.addWidget(new ImageWidget(0, 216, 333, 16, GuiTextures.UI_FRAME_SIDE_DOWN));
} else {
// placeholder
this.addWidget(0, new WidgetGroup());
}
return this;
}
Aggregations