mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
fix hover effects on social panels
This commit is contained in:
@ -37,16 +37,16 @@ namespace osu.Game.Overlays.Social
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint);
|
||||
//Content.MoveToY(-4, hover_transition_time, Easing.OutQuint);
|
||||
Content.TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint);
|
||||
Content.MoveToY(-4, hover_transition_time, Easing.OutQuint);
|
||||
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint);
|
||||
//Content.MoveToY(0, hover_transition_time, Easing.OutQuint);
|
||||
Content.TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint);
|
||||
Content.MoveToY(0, hover_transition_time, Easing.OutQuint);
|
||||
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
@ -28,9 +28,12 @@ namespace osu.Game.Users
|
||||
private const float content_padding = 10;
|
||||
private const float status_height = 30;
|
||||
|
||||
private readonly Container statusBar;
|
||||
private readonly Box statusBg;
|
||||
private readonly OsuSpriteText statusMessage;
|
||||
private Container statusBar;
|
||||
private Box statusBg;
|
||||
private OsuSpriteText statusMessage;
|
||||
|
||||
private Container content;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public readonly Bindable<UserStatus> Status = new Bindable<UserStatus>();
|
||||
|
||||
@ -45,17 +48,28 @@ namespace osu.Game.Users
|
||||
|
||||
this.user = user;
|
||||
|
||||
Height = height - status_height;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuColour colours, UserProfileOverlay profile)
|
||||
{
|
||||
if (colours == null)
|
||||
throw new ArgumentNullException(nameof(colours));
|
||||
|
||||
FillFlowContainer infoContainer;
|
||||
|
||||
Height = height - status_height;
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
AddInternal(content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
CornerRadius = 5,
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Colour = Color4.Black.Opacity(0.25f),
|
||||
Radius = 4,
|
||||
};
|
||||
},
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -164,7 +178,8 @@ namespace osu.Game.Users
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (user.IsSupporter)
|
||||
{
|
||||
@ -174,13 +189,6 @@ namespace osu.Game.Users
|
||||
Width = 20f,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuColour colours, UserProfileOverlay profile)
|
||||
{
|
||||
if (colours == null)
|
||||
throw new ArgumentNullException(nameof(colours));
|
||||
|
||||
Status.ValueChanged += displayStatus;
|
||||
Status.ValueChanged += status => statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint);
|
||||
|
Reference in New Issue
Block a user