Global shadows and more sane font size setting.

This commit is contained in:
Dean Herbert
2017-01-31 18:53:52 +09:00
parent 9e5000d448
commit 6b66ecc131
31 changed files with 113 additions and 73 deletions

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
@ -133,7 +134,7 @@ namespace osu.Game.Graphics.UserInterface
Shear = new Vector2(shear, 0),
EdgeSmoothness = new Vector2(1.5f, 0),
},
new SpriteText
new OsuSpriteText
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,

View File

@ -9,6 +9,7 @@ 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.Graphics.UserInterface
{
@ -86,7 +87,7 @@ namespace osu.Game.Graphics.UserInterface
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new SpriteText
new OsuSpriteText
{
Text = Name,
Anchor = Anchor.Centre,
@ -95,7 +96,7 @@ namespace osu.Game.Graphics.UserInterface
Position = new Vector2(0, -0.25f),
Colour = KeyUpTextColor
},
countSpriteText = new SpriteText
countSpriteText = new OsuSpriteText
{
Text = Count.ToString(@"#,0"),
Anchor = Anchor.Centre,

View File

@ -5,8 +5,10 @@ using System;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
namespace osu.Game.Graphics.UserInterface
@ -16,9 +18,15 @@ namespace osu.Game.Graphics.UserInterface
public OsuButton()
{
Height = 40;
SpriteText.TextSize = OptionsOverlay.FONT_SIZE;
}
protected override SpriteText CreateText() => new OsuSpriteText
{
Depth = -1,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
};
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{

View File

@ -14,6 +14,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using OpenTK;
using OpenTK.Graphics;
@ -77,10 +78,7 @@ namespace osu.Game.Graphics.UserInterface
Children = new Drawable[]
{
labelSpriteText = new SpriteText
{
TextSize = OptionsOverlay.FONT_SIZE,
},
labelSpriteText = new OsuSpriteText(),
light = new Light
{
Anchor = Anchor.CentreRight,

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using OpenTK.Graphics;
@ -15,7 +16,7 @@ namespace osu.Game.Graphics.UserInterface
public OsuTextBox()
{
Height = 40;
TextContainer.Height = OptionsOverlay.FONT_SIZE / Height;
TextContainer.Height = OsuSpriteText.FONT_SIZE / Height;
CornerRadius = 5;
}

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Transformations;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
@ -106,7 +107,7 @@ namespace osu.Game.Graphics.UserInterface
{
Children = new Drawable[]
{
DisplayedCountSpriteText = new SpriteText(),
DisplayedCountSpriteText = new OsuSpriteText(),
};
TextSize = 40;

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
using OpenTK;
using OpenTK.Graphics;
@ -51,7 +52,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
}
}
},
new SpriteText
new OsuSpriteText
{
Text = meterName,
Anchor = Anchor.BottomCentre,