1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:05:35 +08:00

centering image sprite

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-28 21:09:00 +07:00
parent 2b8d41c045
commit e58f690210
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -6,6 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Framework.Graphics.Sprites;
using osuTK;
namespace osu.Game.Overlays.Wiki.Markdown
@ -61,6 +62,12 @@ namespace osu.Game.Overlays.Wiki.Markdown
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
}
protected override Sprite CreateSpriteImage() => base.CreateSpriteImage().With(s =>
{
s.Anchor = Anchor.TopCentre;
s.Origin = Anchor.TopCentre;
});
}
}
}