use of binnie.core.api.gui.IPoint in project Binnie by ForestryMC.
the class TextureRenderer method texture.
public void texture(@Nullable final ITexture texture, final IPoint position) {
if (texture == null) {
return;
}
this.setTexture(texture);
final IPoint point = position.sub(texture.getBorder().getLeft(), texture.getBorder().getTop());
final IArea textureArea = texture.getArea().outset(texture.getBorder());
GuiUtils.drawTexturedModalRect(point.xPos(), point.yPos(), textureArea.pos().xPos(), textureArea.pos().yPos(), textureArea.size().xPos(), textureArea.size().yPos(), 0);
}
use of binnie.core.api.gui.IPoint in project Binnie by ForestryMC.
the class GuiCraftGUI method resize.
public void resize(final IPoint size) {
this.xSize = size.xPos();
this.ySize = size.yPos();
this.guiLeft = (this.width - this.xSize) / 2;
this.guiTop = (this.height - this.ySize) / 2;
this.window.setPosition(new Point(this.guiLeft, this.guiTop));
}
Aggregations