use of igwmod.gui.GuiWiki in project PneumaticCraft by MineMaarten.
the class GuiProgrammer method onIGWAction.
@Optional.Method(modid = ModIds.IGWMOD)
private void onIGWAction() {
int x = lastMouseX;
int y = lastMouseY;
IProgWidget hoveredWidget = programmerUnit.getHoveredWidget(x, y);
if (hoveredWidget != null) {
GuiWiki gui = new GuiWiki();
FMLClientHandler.instance().showGuiScreen(gui);
gui.setCurrentFile("pneumaticcraft:progwidget/" + hoveredWidget.getWidgetString());
}
for (IProgWidget widget : visibleSpawnWidgets) {
if (widget != draggingWidget && x - guiLeft >= widget.getX() && y - guiTop >= widget.getY() && x - guiLeft <= widget.getX() + widget.getWidth() / 2 && y - guiTop <= widget.getY() + widget.getHeight() / 2) {
GuiWiki gui = new GuiWiki();
FMLClientHandler.instance().showGuiScreen(gui);
gui.setCurrentFile("pneumaticcraft:progwidget/" + widget.getWidgetString());
}
}
}
Aggregations