mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Fix skin layout editor PlayerAvatar
applying corner radius weirdly after scale
Closes #29919. I've also made this handle resizing better, so now you can have non-square avatar displays.
This commit is contained in:
parent
cf9f8c7f66
commit
fd45644d0f
@ -39,14 +39,23 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
private IBindable<APIUser>? apiUser;
|
||||
|
||||
private readonly Container cornerContainer;
|
||||
|
||||
public PlayerAvatar()
|
||||
{
|
||||
Size = new Vector2(default_size);
|
||||
|
||||
InternalChild = avatar = new UpdateableAvatar(isInteractive: false)
|
||||
InternalChild = cornerContainer = new Container
|
||||
{
|
||||
Masking = true,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true
|
||||
Child = avatar = new UpdateableAvatar(isInteractive: false)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fill,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -66,7 +75,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
CornerRadius.BindValueChanged(e => avatar.CornerRadius = e.NewValue * default_size, true);
|
||||
CornerRadius.BindValueChanged(e => cornerContainer.CornerRadius = e.NewValue * default_size, true);
|
||||
}
|
||||
|
||||
public bool UsesFixedAnchor { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user