public MultiIconButton(@Nonnull IGuiScreen gui, int id, int x, int y, @Nonnull IWidgetIcon unpressed, @Nonnull IWidgetIcon pressed, @Nonnull IWidgetIcon hover) { super(gui, id, x, y, null); this.unpressed = unpressed; this.pressed = pressed; this.hover = hover; setSize(unpressed.getWidth(), unpressed.getHeight()); }
@Override @SideOnly(Side.CLIENT) public void render(@Nonnull IWidgetIcon widget, double x, double y, boolean doDraw, boolean flipY) { render(widget, x, y, widget.getWidth(), widget.getHeight(), 0, doDraw, flipY); }
@Override @SideOnly(Side.CLIENT) public void render(@Nonnull IWidgetIcon widget, double x, double y, double zLevel, boolean doDraw, boolean flipY) { render(widget, x, y, widget.getWidth(), widget.getHeight(), zLevel, doDraw, flipY); }
@Override @SideOnly(Side.CLIENT) public void render(@Nonnull IWidgetIcon widget, double x, double y, boolean doDraw) { render(widget, x, y, widget.getWidth(), widget.getHeight(), 0, doDraw); }
@Override @SideOnly(Side.CLIENT) public void render(@Nonnull IWidgetIcon widget, double x, double y, double zLevel, boolean doDraw) { render(widget, x, y, widget.getWidth(), widget.getHeight(), zLevel, doDraw); }
private static IProbeInfo addIcon(IProbeInfo probeInfo, IWidgetIcon icon, int border) { ResourceLocation texture = icon.getMap().getTexture(); int x = icon.getX(); int y = icon.getY(); int width = icon.getWidth(); int height = icon.getHeight(); return probeInfo.icon(texture, x, y, width, height, probeInfo.defaultIconStyle().width(width + border).height(height + border)); }
protected TAS(IWidgetIcon icon) { super(icon.getMap().getTexture().toString()); setIconWidth(icon.getWidth()); setIconHeight(icon.getHeight()); initSprite(icon.getMap().getSize(), icon.getMap().getSize(), icon.getX(), icon.getY(), false); }
double maxU = (double) (widget.getX() + widget.getWidth()) / getSize(); double minV = (double) widget.getY() / getSize(); double maxV = (double) (widget.getY() + widget.getHeight()) / getSize();