Skip to content

Commit d0a0abd

Browse files
committed
supersede #121
1 parent d4ba9a9 commit d0a0abd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/java/com/cleanroommc/modularui/drawable/text/StyledText.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public Alignment getAlignment() {
4949
return this.alignment;
5050
}
5151

52-
public int getColor() {
52+
public @Nullable Integer getColor() {
5353
return this.color;
5454
}
5555

5656
public float getScale() {
5757
return this.scale;
5858
}
5959

60-
public boolean isShadow() {
60+
public @Nullable Boolean isShadow() {
6161
return this.shadow;
6262
}
6363

src/main/java/com/cleanroommc/modularui/widgets/ScrollingTextWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public void onUpdate() {
5959
public void draw(ModularGuiContext context, WidgetTheme widgetTheme) {
6060
checkString();
6161
TextRenderer renderer = TextRenderer.SHARED;
62-
renderer.setColor(getColor());
62+
renderer.setColor(getColor() != null ? getColor() : widgetTheme.getTextColor());
6363
renderer.setAlignment(getAlignment(), getArea().w() + 1, getArea().h());
64-
renderer.setShadow(isShadow());
64+
renderer.setShadow(isShadow() != null ? isShadow() : widgetTheme.getTextShadow());
6565
renderer.setPos(getArea().getPadding().left, getArea().getPadding().top);
6666
renderer.setScale(getScale());
6767
renderer.setSimulate(false);

src/main/java/com/cleanroommc/modularui/widgets/TextWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ public float getScale() {
8585
return this.scale;
8686
}
8787

88-
public int getColor() {
88+
public @Nullable Integer getColor() {
8989
return this.color;
9090
}
9191

92-
public boolean isShadow() {
92+
public @Nullable Boolean isShadow() {
9393
return this.shadow;
9494
}
9595

0 commit comments

Comments
 (0)