Merge remote-tracking branch 'smoogipoo/spritetext-rewrite' into update-framework-with-everyrthing

This commit is contained in:
Dean Herbert 2018-09-06 18:00:54 +09:00
commit ab7c0ccd18
4 changed files with 2 additions and 29 deletions

View File

@ -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();

View File

@ -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

View File

@ -137,9 +137,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"));

View File

@ -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
{ {