Skip to content

Commit 2ec2c68

Browse files
committed
feat: allow editing of the alpha value for timer text color
1 parent 8c77a4c commit 2ec2c68

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

common/src/main/java/com/euphony/better_client/config/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public class Config {
110110
public boolean highSensitivityMode = true;
111111
public long trialSpawnerCooldown = 1800;
112112
public boolean enableDynamicTimerColor = true;
113-
public int timerColor = 0xFF88FF;
113+
public int timerColor = 0xFFFF88FF;
114114
public boolean enableDropShadow = true;
115115

116116
public Config() {}

common/src/main/java/com/euphony/better_client/config/screen/category/VisualityConfigScreen.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public static Screen generateScreen(Screen parent) {
9494
);
9595

9696
Option<Color> timerColorOpt = ConfigUtils.<Color>getGenericOption("timerColor")
97-
.binding(new Color(DEFAULTS.timerColor, false),
98-
() -> new Color(config.timerColor, false),
97+
.binding(new Color(DEFAULTS.timerColor, true),
98+
() -> new Color(config.timerColor, true),
9999
newVal -> config.timerColor = newVal.getRGB())
100-
.controller(opt -> ColorControllerBuilder.create(opt).allowAlpha(false))
100+
.controller(opt -> ColorControllerBuilder.create(opt).allowAlpha(true))
101101
.build();
102102

103103
Option<Boolean> enableDropShadowOpt = ConfigUtils.buildBooleanOption(

common/src/main/java/com/euphony/better_client/screen/TrialSpawnerTimerRenderer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ private static Font.DisplayMode getDisplayMode() {
101101
}
102102

103103
private static int calculateTimerColor(Timer timer, long currentTime) {
104-
if (!config.enableDynamicTimerColor) {
105-
return 0xFF000000 | config.timerColor;
106-
}
104+
if (!config.enableDynamicTimerColor) return config.timerColor;
107105

108106
double progress = timer.getProgress(currentTime); // 0.0 ~ 1.0
109107

0 commit comments

Comments
 (0)