mirror of
https://github.com/neoforged/NeoForge.git
synced 2026-10-12 02:19:42 +00:00
19 lines
942 B
Diff
19 lines
942 B
Diff
--- a/net/minecraft/client/gui/components/AbstractButton.java
|
|
+++ b/net/minecraft/client/gui/components/AbstractButton.java
|
|
@@ -40,7 +_,14 @@
|
|
protected abstract void extractContents(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a);
|
|
|
|
protected void extractDefaultLabel(ActiveTextCollector output) {
|
|
- this.extractScrollingStringOverContents(output, this.getMessage(), 2);
|
|
+ // Neo: Apply forced label text color if set
|
|
+ Component message = this.getMessage();
|
|
+ if (this.labelTextColor != null) {
|
|
+ int labelTextColor = this.labelTextColor; // Unbox ahead of time so no warning about unboxing in withStyle's lambda
|
|
+ message = message.copy().withStyle(style -> style.withColor(labelTextColor));
|
|
+ }
|
|
+
|
|
+ this.extractScrollingStringOverContents(output, message, 2);
|
|
}
|
|
|
|
protected final void extractDefaultSprite(GuiGraphicsExtractor graphics) {
|