mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use constant for blur amount
This commit is contained in:
@ -302,7 +302,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
|
|
||||||
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
|
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
|
||||||
|
|
||||||
public bool IsUserBlurApplied() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2((float)BlurLevel.Value * 25);
|
public bool IsUserBlurApplied() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2((float)BlurLevel.Value * BackgroundScreenBeatmap.USER_BLUR_FACTOR);
|
||||||
|
|
||||||
public bool IsUserBlurDisabled() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(0);
|
public bool IsUserBlurDisabled() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(0);
|
||||||
|
|
||||||
|
@ -18,6 +18,11 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
{
|
{
|
||||||
public class BackgroundScreenBeatmap : BackgroundScreen
|
public class BackgroundScreenBeatmap : BackgroundScreen
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of blur to apply when full user blur is requested.
|
||||||
|
/// </summary>
|
||||||
|
public const float USER_BLUR_FACTOR = 25;
|
||||||
|
|
||||||
protected Background Background;
|
protected Background Background;
|
||||||
|
|
||||||
private WorkingBeatmap beatmap;
|
private WorkingBeatmap beatmap;
|
||||||
@ -154,7 +159,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
/// As an optimisation, we add the two blur portions to be applied rather than actually applying two separate blurs.
|
/// As an optimisation, we add the two blur portions to be applied rather than actually applying two separate blurs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Vector2 blurTarget => EnableUserDim.Value
|
private Vector2 blurTarget => EnableUserDim.Value
|
||||||
? new Vector2(BlurAmount.Value + (float)userBlurLevel.Value * 25)
|
? new Vector2(BlurAmount.Value + (float)userBlurLevel.Value * USER_BLUR_FACTOR)
|
||||||
: new Vector2(BlurAmount.Value);
|
: new Vector2(BlurAmount.Value);
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Reference in New Issue
Block a user