mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:22:54 +08:00
Replace if/else statement
This commit is contained in:
parent
5b68a2f34a
commit
cb910a6518
@ -150,20 +150,12 @@ namespace osu.Game.Screens.Multi.Match
|
||||
{
|
||||
const float fade_duration = 500;
|
||||
|
||||
if (tab.NewValue is SettingsMatchPage)
|
||||
{
|
||||
header.ShowBeatmapPanel.Value = false;
|
||||
settings.Show();
|
||||
info.FadeOut(fade_duration, Easing.OutQuint);
|
||||
bottomRow.FadeOut(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
{
|
||||
header.ShowBeatmapPanel.Value = true;
|
||||
settings.Hide();
|
||||
info.FadeIn(fade_duration, Easing.OutQuint);
|
||||
bottomRow.FadeIn(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
var settingsDisplayed = tab.NewValue is SettingsMatchPage;
|
||||
|
||||
header.ShowBeatmapPanel.Value = !settingsDisplayed;
|
||||
settings.State.Value = settingsDisplayed ? Visibility.Visible : Visibility.Hidden;
|
||||
info.FadeTo(settingsDisplayed ? 0 : 1, fade_duration, Easing.OutQuint);
|
||||
bottomRow.FadeTo(settingsDisplayed ? 0 : 1, fade_duration, Easing.OutQuint);
|
||||
}, true);
|
||||
|
||||
chat.Exit += () =>
|
||||
|
Loading…
Reference in New Issue
Block a user