mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Fix banana shower placement outline initial opacity
This commit is contained in:
@ -17,6 +17,8 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
|||||||
{
|
{
|
||||||
private const float border_width = 4;
|
private const float border_width = 4;
|
||||||
|
|
||||||
|
private const float opacity_when_empty = 0.5f;
|
||||||
|
|
||||||
private bool isEmpty = true;
|
private bool isEmpty = true;
|
||||||
|
|
||||||
public TimeSpanOutline()
|
public TimeSpanOutline()
|
||||||
@ -26,6 +28,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
|||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
BorderThickness = border_width;
|
BorderThickness = border_width;
|
||||||
|
Alpha = opacity_when_empty;
|
||||||
|
|
||||||
// A box is needed to make the border visible.
|
// A box is needed to make the border visible.
|
||||||
InternalChild = new Box
|
InternalChild = new Box
|
||||||
@ -52,7 +55,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
|||||||
bool wasEmpty = isEmpty;
|
bool wasEmpty = isEmpty;
|
||||||
isEmpty = height == 0;
|
isEmpty = height == 0;
|
||||||
if (wasEmpty != isEmpty)
|
if (wasEmpty != isEmpty)
|
||||||
this.FadeTo(isEmpty ? 0.5f : 1f, 150);
|
this.FadeTo(isEmpty ? opacity_when_empty : 1f, 150);
|
||||||
|
|
||||||
Height = Math.Max(height, border_width);
|
Height = Math.Max(height, border_width);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user