mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Fixed tribe button rendering on newer Kirin versions
This commit is contained in:
parent
3e4542af7f
commit
c6e94d758b
1 changed files with 6 additions and 1 deletions
|
@ -50,8 +50,10 @@ public class TribeButton extends Button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ISprite icon = getStyle().getIcon();
|
||||||
|
|
||||||
if (getStyle().hasIcon()) {
|
if (getStyle().hasIcon()) {
|
||||||
getStyle().getIcon().render(context, getX(), getY(), mouseX, mouseY, partialTicks);
|
icon.render(context, getX(), getY(), mouseX, mouseY, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
int foreColor = getStyle().getColor();
|
int foreColor = getStyle().getColor();
|
||||||
|
@ -63,8 +65,11 @@ public class TribeButton extends Button {
|
||||||
|
|
||||||
setMessage(getStyle().getText());
|
setMessage(getStyle().getText());
|
||||||
|
|
||||||
|
getStyle().setIcon(ISprite.EMPTY);
|
||||||
|
|
||||||
renderForground(context, mc, mouseX, mouseY, foreColor | MathHelper.ceil(alpha * 255.0F) << 24);
|
renderForground(context, mc, mouseX, mouseY, foreColor | MathHelper.ceil(alpha * 255.0F) << 24);
|
||||||
|
|
||||||
|
getStyle().setIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ISprite createSprite(Race race, int x, int y, int size) {
|
public static ISprite createSprite(Race race, int x, int y, int size) {
|
||||||
|
|
Loading…
Reference in a new issue