1
mirror of https://github.com/Shiewk/Widgets.git synced 2026-04-28 11:34:17 +02:00

Automatically hide text color option when dynamic color is enabled on BandwidthWidget or PingWidget

This commit is contained in:
Shy
2024-09-09 10:01:58 +02:00
parent c61dca9533
commit 9e7c71e928
2 changed files with 2 additions and 0 deletions
@@ -14,6 +14,7 @@ public class BandwidthWidget extends BasicTextWidget {
super(id, List.of(
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.bandwidth.dynamicColor"), true)
));
getSettings().optionById("textcolor").setShowCondition(() -> !this.dynamicColor);
}
private int t = 0;
@@ -18,6 +18,7 @@ public class PingWidget extends BasicTextWidget {
super(id, List.of(
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.ping.dynamicColor"), true)
));
getSettings().optionById("textcolor").setShowCondition(() -> !this.dynamicColor);
}
private boolean dynamicColor = false;