1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-06 23:12:54 +08:00

Wrong location

This commit is contained in:
Lunar Dust 2016-10-17 15:57:21 -05:00 committed by GitHub
parent e254070dfb
commit 68f3a1b71d

View File

@ -1,40 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using OpenTK;
namespace osu.Framework.Graphics.Sprites
{
public class Avatar : Sprite
{
public int userId = 0, rounding = 0;
public int avatarSize = 50;
public Avatar(int uId, int aSize, int round)
{
this.userId = uId;
this.avatarSize = aSize;
this.rounding = round;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
}
public override async void Load(BaseGame game)
{
base.Load(game);
Texture = await game.Textures.GetAsync($@"https://a.ppy.sh/{userId}");
Size = new Vector2(avatarSize);
CornerRadius = rounding;
}
}
}