mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Apply changes in line with osu!framework changes
This commit is contained in:
parent
b0f9c0f6f0
commit
d5acc96efa
@ -4,7 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
@ -16,7 +15,6 @@ namespace osu.Game.Graphics
|
|||||||
|
|
||||||
public DrawableDate(DateTimeOffset date)
|
public DrawableDate(DateTimeOffset date)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
Font = "Exo2.0-RegularItalic";
|
Font = "Exo2.0-RegularItalic";
|
||||||
|
|
||||||
Date = date.ToLocalTime();
|
Date = date.ToLocalTime();
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Sprites
|
namespace osu.Game.Graphics.Sprites
|
||||||
@ -19,27 +16,6 @@ namespace osu.Game.Graphics.Sprites
|
|||||||
Shadow = true;
|
Shadow = true;
|
||||||
TextSize = FONT_SIZE;
|
TextSize = FONT_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateFallbackCharacterDrawable()
|
|
||||||
{
|
|
||||||
var tex = GetTextureForCharacter('?');
|
|
||||||
|
|
||||||
if (tex != null)
|
|
||||||
{
|
|
||||||
float adjust = (RNG.NextSingle() - 0.5f) * 2;
|
|
||||||
return new Sprite
|
|
||||||
{
|
|
||||||
Texture = tex,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Scale = new Vector2(1 + adjust * 0.2f),
|
|
||||||
Rotation = adjust * 15,
|
|
||||||
Colour = Color4.White,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return base.CreateFallbackCharacterDrawable();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class OsuSpriteTextTransformExtensions
|
public static class OsuSpriteTextTransformExtensions
|
||||||
|
@ -138,9 +138,8 @@ namespace osu.Game
|
|||||||
fileImporters.Add(SkinManager);
|
fileImporters.Add(SkinManager);
|
||||||
|
|
||||||
//this completely overrides the framework default. will need to change once we make a proper FontStore.
|
//this completely overrides the framework default. will need to change once we make a proper FontStore.
|
||||||
dependencies.Cache(Fonts = new FontStore { ScaleAdjust = 100 });
|
dependencies.Cache(Fonts = new FontStore(new GlyphStore(Resources, @"Fonts/FontAwesome")));
|
||||||
|
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome"));
|
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/osuFont"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/osuFont"));
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Medium"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Medium"));
|
||||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
||||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
},
|
},
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Children = new[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FileStore fileStore)
|
private void load(FileStore fileStore)
|
||||||
{
|
{
|
||||||
dependencies.Cache(new TextureStore(new RawTextureLoaderStore(fileStore.Store), false) { ScaleAdjust = 1, });
|
dependencies.Cache(new TextureStore(new RawTextureLoaderStore(fileStore.Store), false, scaleAdjust: 1));
|
||||||
|
|
||||||
foreach (var layer in Storyboard.Layers)
|
foreach (var layer in Storyboard.Layers)
|
||||||
Add(layer.CreateDrawable());
|
Add(layer.CreateDrawable());
|
||||||
|
Loading…
Reference in New Issue
Block a user