mirror of https://github.com/ppy/osu
Apply changes in line with osu!framework changes
This commit is contained in:
parent
b0f9c0f6f0
commit
d5acc96efa
|
@ -4,7 +4,6 @@
|
|||
using System;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
|
@ -16,7 +15,6 @@ public class DrawableDate : OsuSpriteText, IHasTooltip
|
|||
|
||||
public DrawableDate(DateTimeOffset date)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Font = "Exo2.0-RegularItalic";
|
||||
|
||||
Date = date.ToLocalTime();
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.MathUtils;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
|
||||
namespace osu.Game.Graphics.Sprites
|
||||
|
@ -19,27 +16,6 @@ public OsuSpriteText()
|
|||
Shadow = true;
|
||||
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
|
||||
|
|
|
@ -138,9 +138,8 @@ private void load()
|
|||
fileImporters.Add(SkinManager);
|
||||
|
||||
//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/Exo2.0-Medium"));
|
||||
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-MediumItalic"));
|
||||
|
|
|
@ -73,7 +73,7 @@ private void load(OsuColour colours)
|
|||
},
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Children = new[]
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ public DrawableStoryboard(Storyboard storyboard)
|
|||
[BackgroundDependencyLoader]
|
||||
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)
|
||||
Add(layer.CreateDrawable());
|
||||
|
|
Loading…
Reference in New Issue