Fix backwards warning text presence check

This commit is contained in:
Bartłomiej Dach 2021-08-19 22:33:05 +02:00
parent 5f1948d040
commit 143b8df1b2
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Settings
{ {
set set
{ {
bool hasValue = string.IsNullOrWhiteSpace(value.ToString()); bool hasValue = !string.IsNullOrWhiteSpace(value.ToString());
if (warningText == null) if (warningText == null)
{ {
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Settings
FlowContent.Add(warningText = new SettingsNoticeText(colours) { Margin = new MarginPadding { Bottom = 5 } }); FlowContent.Add(warningText = new SettingsNoticeText(colours) { Margin = new MarginPadding { Bottom = 5 } });
} }
warningText.Alpha = hasValue ? 0 : 1; warningText.Alpha = hasValue ? 1 : 0;
warningText.Text = value.ToString(); // TODO: Remove ToString() call after TextFlowContainer supports localisation (see https://github.com/ppy/osu-framework/issues/4636). warningText.Text = value.ToString(); // TODO: Remove ToString() call after TextFlowContainer supports localisation (see https://github.com/ppy/osu-framework/issues/4636).
} }
} }