--- a/net/minecraft/client/gui/widget/Widget.java +++ b/net/minecraft/client/gui/widget/Widget.java @@ -111,7 +111,7 @@ this.blit(this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.blit(this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); this.renderBg(minecraft, p_renderButton_1_, p_renderButton_2_); - int j = this.active ? 16777215 : 10526880; + int j = getFGColor(); this.drawCenteredString(fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.func_76123_f(this.alpha * 255.0F) << 24); } @@ -206,6 +206,14 @@ this.width = p_setWidth_1_; } + public int getHeight() { + return this.height; + } + + public void setHeight(int value) { + this.height = value; + } + public void setAlpha(float p_setAlpha_1_) { this.alpha = p_setAlpha_1_; } @@ -233,4 +241,17 @@ protected void setFocused(boolean p_setFocused_1_) { this.focused = p_setFocused_1_; } + + public static final int UNSET_FG_COLOR = -1; + protected int packedFGColor = UNSET_FG_COLOR; + public int getFGColor() { + if (packedFGColor != UNSET_FG_COLOR) return packedFGColor; + return this.active ? 16777215 : 10526880; // White : Light Grey + } + public void setFGColor(int color) { + this.packedFGColor = color; + } + public void clearFGColor() { + this.packedFGColor = UNSET_FG_COLOR; + } }