use of net.malisis.core.renderer.icon.provider.GuiIconProvider in project Almura by AlmuraDev.
the class UIAvatarImage method drawForeground.
@Override
public void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTicks) {
if (this.playerInfo == null) {
return;
}
final GuiTexture texture = new GuiTexture(this.playerInfo.getLocationSkin(), 64, 64);
// Draw base face
((GuiIconProvider) this.iconProvider).setIcon(texture.createIcon(FACE_X_BASE, FACE_Y_BASE, FACE_WIDTH, FACE_HEIGHT));
renderer.bindTexture(texture);
renderer.drawShape(this.shape, this.rp);
// Reset shape
this.shape.resetState();
this.shape.setSize(this.width, this.height);
this.shape.setPosition(0, 0);
// Draw overlay face
((GuiIconProvider) this.iconProvider).setIcon(texture.createIcon(FACE_X_OVERLAY, FACE_Y_OVERLAY, FACE_WIDTH, FACE_HEIGHT));
renderer.drawShape(this.shape, this.rp);
}
Aggregations