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:
@@ -14,6 +14,7 @@ public class BandwidthWidget extends BasicTextWidget {
|
|||||||
super(id, List.of(
|
super(id, List.of(
|
||||||
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.bandwidth.dynamicColor"), true)
|
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.bandwidth.dynamicColor"), true)
|
||||||
));
|
));
|
||||||
|
getSettings().optionById("textcolor").setShowCondition(() -> !this.dynamicColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int t = 0;
|
private int t = 0;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PingWidget extends BasicTextWidget {
|
|||||||
super(id, List.of(
|
super(id, List.of(
|
||||||
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.ping.dynamicColor"), true)
|
new ToggleWidgetSetting("dynamic_color", Text.translatable("widgets.widgets.ping.dynamicColor"), true)
|
||||||
));
|
));
|
||||||
|
getSettings().optionById("textcolor").setShowCondition(() -> !this.dynamicColor);
|
||||||
}
|
}
|
||||||
private boolean dynamicColor = false;
|
private boolean dynamicColor = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user