mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
Use conditional operator isntead of if
This commit is contained in:
parent
df148f8787
commit
f241d67e5f
@ -81,10 +81,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
|
||||
private void updateBackgroundDim()
|
||||
{
|
||||
if (UpdateDim)
|
||||
FadeContainer?.FadeColour(OsuColour.Gray(1 - (float)DimLevel), 800, Easing.OutQuint);
|
||||
else
|
||||
FadeContainer?.FadeColour(Color4.White, 800, Easing.OutQuint);
|
||||
FadeContainer?.FadeColour(UpdateDim ? OsuColour.Gray(1 - (float)DimLevel) : Color4.White, 800, Easing.OutQuint);
|
||||
}
|
||||
|
||||
public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null)
|
||||
|
@ -61,6 +61,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public CursorContainer Cursor => RulesetContainer.Cursor;
|
||||
public bool ProvidingUserCursor => RulesetContainer?.Cursor != null && !RulesetContainer.HasReplayLoaded.Value;
|
||||
protected float BackgroundOpacity => 1 - (float)DimLevel;
|
||||
|
||||
private IAdjustableClock sourceClock;
|
||||
|
||||
|
@ -19,8 +19,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
protected const float BACKGROUND_FADE_DURATION = 800;
|
||||
|
||||
protected float BackgroundOpacity => 1 - (float)DimLevel;
|
||||
|
||||
#region User Settings
|
||||
|
||||
protected Bindable<double> DimLevel;
|
||||
|
Loading…
Reference in New Issue
Block a user