use of mezz.jei.gui.Focus in project GregTech by GregTechCEu.
the class RGNode method init.
private void init(RGContainer container) {
this.container = container;
textWidget = new SimpleTextWidget(9, -5, "", -1, () -> {
if (head instanceof ItemStack) {
return ((ItemStack) head).getDisplayName();
} else if (head instanceof FluidStack) {
return ((FluidStack) head).getLocalizedName();
}
return "terminal.recipe_chart.drag";
}, true).setShadow(true);
textWidget.setVisible(false);
textWidget.setActive(false);
this.addWidget(textWidget);
inputsGroup = new WidgetGroup(0, 0, 0, 0);
this.addWidget(inputsGroup);
toolGroup = new WidgetGroup(0, 0, 0, 0);
this.addWidget(toolGroup);
toolGroup.addWidget(new CircleButtonWidget(-11, 9, 8, 1, 12).setColors(0, TerminalTheme.COLOR_7.getColor(), TerminalTheme.COLOR_3.getColor()).setIcon(GuiTextures.ICON_REMOVE).setHoverText("terminal.guide_editor.remove").setClickListener(cd -> remove()));
toolGroup.addWidget(new CircleButtonWidget(-11, 29, 8, 1, 12).setColors(0, TerminalTheme.COLOR_7.getColor(), 0).setIcon(GuiTextures.ICON_VISIBLE).setHoverText("terminal.recipe_chart.visible").setClickListener(cd -> {
textWidget.setActive(!textWidget.isActive());
textWidget.setVisible(!textWidget.isVisible());
}));
toolGroup.addWidget(new CircleButtonWidget(9, 29, 8, 1, 12).setColors(0, TerminalTheme.COLOR_7.getColor(), 0).setIcon(GuiTextures.ICON_LOCATION).setHoverText("terminal.recipe_chart.jei").setClickListener(cd -> {
if (GTJeiPlugin.jeiRuntime != null && head != null) {
GTJeiPlugin.jeiRuntime.getRecipesGui().show(new Focus<>(IFocus.Mode.OUTPUT, head));
}
}));
inputsGroup.setVisible(false);
inputsGroup.setActive(false);
toolGroup.setVisible(false);
toolGroup.setActive(false);
parentNodes = new HashMap<>();
// important
children = new LinkedHashMap<>();
}
Aggregations