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