mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Seperate updateable from drawable
This commit is contained in:
@ -3,33 +3,12 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Users.Drawables
|
||||
{
|
||||
public class UpdateableFlag : ModelBackedDrawable<Country>
|
||||
{
|
||||
public Country Country
|
||||
{
|
||||
get => Model;
|
||||
set => Model = value;
|
||||
}
|
||||
|
||||
public UpdateableFlag(Country country = null)
|
||||
{
|
||||
Country = country;
|
||||
}
|
||||
|
||||
protected override Drawable CreateDrawable(Country country) => new DrawableFlag(country)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
}
|
||||
|
||||
public class DrawableFlag : Sprite, IHasTooltip
|
||||
{
|
||||
private readonly Country country;
|
||||
|
Reference in New Issue
Block a user