mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Move to local components namespace
This commit is contained in:
parent
0ef5b8f464
commit
8ba2ac922f
@ -19,7 +19,7 @@ namespace osu.Game.Graphics
|
|||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Font = "Exo2.0-RegularItalic";
|
Font = "Exo2.0-RegularItalic";
|
||||||
|
|
||||||
this.Date = date.ToLocalTime();
|
Date = date.ToLocalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Graphics
|
namespace osu.Game.Overlays.Profile.Components
|
||||||
{
|
{
|
||||||
public class DrawableJoinDate : DrawableDate
|
public class DrawableJoinDate : DrawableDate
|
||||||
{
|
{
|
50
osu.Game/Overlays/Profile/Components/GradeBadge.cs
Normal file
50
osu.Game/Overlays/Profile/Components/GradeBadge.cs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Graphics.Textures;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Components
|
||||||
|
{
|
||||||
|
public class GradeBadge : Container
|
||||||
|
{
|
||||||
|
private const float width = 50;
|
||||||
|
private readonly string grade;
|
||||||
|
private readonly Sprite badge;
|
||||||
|
private readonly SpriteText numberText;
|
||||||
|
|
||||||
|
public int DisplayCount
|
||||||
|
{
|
||||||
|
set => numberText.Text = value.ToString(@"#,0");
|
||||||
|
}
|
||||||
|
|
||||||
|
public GradeBadge(string grade)
|
||||||
|
{
|
||||||
|
this.grade = grade;
|
||||||
|
Width = width;
|
||||||
|
Height = 41;
|
||||||
|
Add(badge = new Sprite
|
||||||
|
{
|
||||||
|
Width = width,
|
||||||
|
Height = 26
|
||||||
|
});
|
||||||
|
Add(numberText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomCentre,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
TextSize = 14,
|
||||||
|
Font = @"Exo2.0-Bold"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(TextureStore textures)
|
||||||
|
{
|
||||||
|
badge.Texture = textures.Get($"Grades/{grade}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -16,6 +16,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Overlays.Profile.Components;
|
||||||
using osu.Game.Overlays.Profile.Header;
|
using osu.Game.Overlays.Profile.Header;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
@ -470,43 +471,5 @@ namespace osu.Game.Overlays.Profile
|
|||||||
|
|
||||||
infoTextRight.NewLine();
|
infoTextRight.NewLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class GradeBadge : Container
|
|
||||||
{
|
|
||||||
private const float width = 50;
|
|
||||||
private readonly string grade;
|
|
||||||
private readonly Sprite badge;
|
|
||||||
private readonly SpriteText numberText;
|
|
||||||
|
|
||||||
public int DisplayCount
|
|
||||||
{
|
|
||||||
set { numberText.Text = value.ToString(@"#,0"); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public GradeBadge(string grade)
|
|
||||||
{
|
|
||||||
this.grade = grade;
|
|
||||||
Width = width;
|
|
||||||
Height = 41;
|
|
||||||
Add(badge = new Sprite
|
|
||||||
{
|
|
||||||
Width = width,
|
|
||||||
Height = 26
|
|
||||||
});
|
|
||||||
Add(numberText = new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomCentre,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
TextSize = 14,
|
|
||||||
Font = @"Exo2.0-Bold"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
badge.Texture = textures.Get($"Grades/{grade}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user