mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Merge pull request #4300 from smoogipoo/osu-fontusage
Apply FontUsage changes
This commit is contained in:
commit
999b36ad17
@ -60,7 +60,7 @@ namespace osu.Desktop.Overlays
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = game.Name
|
||||
},
|
||||
new OsuSpriteText
|
||||
@ -74,9 +74,8 @@ namespace osu.Desktop.Overlays
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
TextSize = 12,
|
||||
Font = OsuFont.Numeric.With(size: 12),
|
||||
Colour = colours.Yellow,
|
||||
Font = @"Venera",
|
||||
Text = @"Development Build"
|
||||
},
|
||||
new Sprite
|
||||
|
@ -14,6 +14,7 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
@ -141,7 +142,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = description
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
private void load()
|
||||
{
|
||||
if (JudgementText != null)
|
||||
JudgementText.TextSize = 25;
|
||||
JudgementText.Font = JudgementText.Font.With(size: 25);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
@ -16,6 +16,7 @@ using osuTK.Graphics;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
@ -313,7 +314,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
Origin = Anchor.Centre,
|
||||
Text = result.IsHit ? "Hit!" : "Miss!",
|
||||
Colour = result.IsHit ? Color4.Green : Color4.Red,
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30),
|
||||
Position = osuObject.HitObject.StackedEndPosition + judgementOffsetDirection * new Vector2(0, 45)
|
||||
});
|
||||
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
@ -42,9 +43,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
}, s => s.GetTexture("Play/osu/hitcircle") == null),
|
||||
number = new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText
|
||||
{
|
||||
Font = @"Venera",
|
||||
Font = OsuFont.Numeric.With(size: 40),
|
||||
UseFullGlyphHeight = false,
|
||||
TextSize = 40,
|
||||
}, restrictSize: false)
|
||||
{
|
||||
Text = @"1"
|
||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
@ -23,16 +24,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = @"0",
|
||||
Font = @"Venera",
|
||||
TextSize = 24
|
||||
Font = OsuFont.Numeric.With(size: 24)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = @"SPINS PER MINUTE",
|
||||
Font = @"Venera",
|
||||
TextSize = 12,
|
||||
Font = OsuFont.Numeric.With(size: 12),
|
||||
Y = 30
|
||||
}
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Lists;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
@ -196,8 +197,8 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Direction = FillDirection.Horizontal;
|
||||
Add(new OsuSpriteText { Text = header + @": ", TextSize = text_size });
|
||||
Add(valueText = new OsuSpriteText { TextSize = text_size });
|
||||
Add(new OsuSpriteText { Text = header + @": ", Font = OsuFont.GetFont(size: text_size) });
|
||||
Add(valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: text_size) });
|
||||
Margin = new MarginPadding(margin);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ namespace osu.Game.Tests.Visual
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isItalic() => newLine.ContentFlow.Where(d => d is OsuSpriteText).Cast<OsuSpriteText>().All(sprite => sprite.Font == "Exo2.0-MediumItalic");
|
||||
bool isItalic() => newLine.ContentFlow.Where(d => d is OsuSpriteText).Cast<OsuSpriteText>().All(sprite => sprite.Font.Italics);
|
||||
|
||||
bool isShowingLinks()
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Screens.Menu;
|
||||
|
||||
@ -22,7 +23,7 @@ namespace osu.Game.Tests.Visual
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "Fired!",
|
||||
TextSize = 50,
|
||||
Font = OsuFont.GetFont(size: 50),
|
||||
Alpha = 0,
|
||||
};
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 20,
|
||||
Font = OsuFont.GetFont(size: 20),
|
||||
Text = @"Wave Container",
|
||||
},
|
||||
},
|
||||
|
@ -4,6 +4,7 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -31,8 +32,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
public float TextSize
|
||||
{
|
||||
get => statusText.TextSize;
|
||||
set => statusText.TextSize = value;
|
||||
get => statusText.Font.Size;
|
||||
set => statusText.Font = statusText.Font.With(size: value);
|
||||
}
|
||||
|
||||
public MarginPadding TextPadding
|
||||
@ -58,7 +59,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -46,8 +46,6 @@ namespace osu.Game.Graphics.Cursor
|
||||
}
|
||||
}
|
||||
|
||||
private const float text_size = 16;
|
||||
|
||||
public OsuTooltip()
|
||||
{
|
||||
AutoSizeEasing = Easing.OutQuint;
|
||||
@ -69,9 +67,8 @@ namespace osu.Game.Graphics.Cursor
|
||||
},
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
TextSize = text_size,
|
||||
Padding = new MarginPadding(5),
|
||||
Font = @"Exo2.0-Regular",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Regular)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -30,8 +30,7 @@ namespace osu.Game.Graphics
|
||||
|
||||
public DrawableDate(DateTimeOffset date)
|
||||
{
|
||||
Font = "Exo2.0-RegularItalic";
|
||||
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true);
|
||||
Date = date;
|
||||
}
|
||||
|
||||
|
117
osu.Game/Graphics/OsuFont.cs
Normal file
117
osu.Game/Graphics/OsuFont.cs
Normal file
@ -0,0 +1,117 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Graphics
|
||||
{
|
||||
public struct OsuFont
|
||||
{
|
||||
/// <summary>
|
||||
/// The default font size.
|
||||
/// </summary>
|
||||
public const float DEFAULT_FONT_SIZE = 16;
|
||||
|
||||
/// <summary>
|
||||
/// The default font.
|
||||
/// </summary>
|
||||
public static FontUsage Default => GetFont();
|
||||
|
||||
public static FontUsage Numeric => GetFont(Typeface.Venera, weight: FontWeight.Regular);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a <see cref="FontUsage"/>.
|
||||
/// </summary>
|
||||
/// <param name="typeface">The font typeface.</param>
|
||||
/// <param name="size">The size of the text in local space. For a value of 16, a single line will have a height of 16px.</param>
|
||||
/// <param name="weight">The font weight.</param>
|
||||
/// <param name="italics">Whether the font is italic.</param>
|
||||
/// <param name="fixedWidth">Whether all characters should be spaced the same distance apart.</param>
|
||||
/// <returns>The <see cref="FontUsage"/>.</returns>
|
||||
public static FontUsage GetFont(Typeface typeface = Typeface.Exo, float size = DEFAULT_FONT_SIZE, FontWeight weight = FontWeight.Medium, bool italics = false, bool fixedWidth = false)
|
||||
=> new FontUsage(GetFamilyString(typeface), size, GetWeightString(typeface, weight), italics, fixedWidth);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the string representation of a <see cref="Typeface"/>.
|
||||
/// </summary>
|
||||
/// <param name="typeface">The <see cref="Typeface"/>.</param>
|
||||
/// <returns>The string representation.</returns>
|
||||
public static string GetFamilyString(Typeface typeface)
|
||||
{
|
||||
switch (typeface)
|
||||
{
|
||||
case Typeface.Exo:
|
||||
return "Exo2.0";
|
||||
case Typeface.FontAwesome:
|
||||
return "FontAwesome";
|
||||
case Typeface.Venera:
|
||||
return "Venera";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
||||
/// </summary>
|
||||
/// <param name="typeface">The <see cref="Typeface"/>.</param>
|
||||
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
|
||||
public static string GetWeightString(Typeface typeface, FontWeight weight)
|
||||
=> GetWeightString(GetFamilyString(typeface), weight);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
||||
/// </summary>
|
||||
/// <param name="typeface">The <see cref="Typeface"/>.</param>
|
||||
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
|
||||
public static string GetWeightString(string family, FontWeight weight)
|
||||
{
|
||||
string weightString = weight.ToString();
|
||||
|
||||
// Only exo has an explicit "regular" weight, other fonts do not
|
||||
if (family != GetFamilyString(Typeface.Exo) && weight == FontWeight.Regular)
|
||||
weightString = string.Empty;
|
||||
|
||||
return weightString;
|
||||
}
|
||||
}
|
||||
|
||||
public static class OsuFontExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="FontUsage"/> by applying adjustments to this <see cref="FontUsage"/>.
|
||||
/// </summary>
|
||||
/// <param name="typeface">The font typeface. If null, the value is copied from this <see cref="FontUsage"/>.</param>
|
||||
/// <param name="size">The text size. If null, the value is copied from this <see cref="FontUsage"/>.</param>
|
||||
/// <param name="weight">The font weight. If null, the value is copied from this <see cref="FontUsage"/>.</param>
|
||||
/// <param name="italics">Whether the font is italic. If null, the value is copied from this <see cref="FontUsage"/>.</param>
|
||||
/// <param name="fixedWidth">Whether all characters should be spaced apart the same distance. If null, the value is copied from this <see cref="FontUsage"/>.</param>
|
||||
/// <returns>The resulting <see cref="FontUsage"/>.</returns>
|
||||
public static FontUsage With(this FontUsage usage, Typeface? typeface = null, float? size = null, FontWeight? weight = null, bool? italics = null, bool? fixedWidth = null)
|
||||
{
|
||||
string familyString = typeface != null ? OsuFont.GetFamilyString(typeface.Value) : usage.Family;
|
||||
string weightString = weight != null ? OsuFont.GetWeightString(familyString, weight.Value) : usage.Weight;
|
||||
|
||||
return usage.With(familyString, size, weightString, italics, fixedWidth);
|
||||
}
|
||||
}
|
||||
|
||||
public enum Typeface
|
||||
{
|
||||
Exo,
|
||||
FontAwesome,
|
||||
Venera,
|
||||
}
|
||||
|
||||
public enum FontWeight
|
||||
{
|
||||
Light,
|
||||
Regular,
|
||||
Medium,
|
||||
SemiBold,
|
||||
Bold,
|
||||
Black
|
||||
}
|
||||
}
|
@ -9,12 +9,10 @@ namespace osu.Game.Graphics.Sprites
|
||||
{
|
||||
public class OsuSpriteText : SpriteText
|
||||
{
|
||||
public const float FONT_SIZE = 16;
|
||||
|
||||
public OsuSpriteText()
|
||||
{
|
||||
Shadow = true;
|
||||
TextSize = FONT_SIZE;
|
||||
Font = OsuFont.Default;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public BreadcrumbTabItem(T value) : base(value)
|
||||
{
|
||||
Text.TextSize = 18;
|
||||
Text.Font = Text.Font.With(size: 18);
|
||||
Text.Margin = new MarginPadding { Vertical = 8 };
|
||||
Padding = new MarginPadding { Right = padding + item_chevron_size };
|
||||
Add(Chevron = new SpriteIcon
|
||||
|
@ -141,8 +141,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Text = Text,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 28,
|
||||
Font = "Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 28, weight: FontWeight.Bold),
|
||||
Shadow = true,
|
||||
ShadowColour = new Color4(0, 0, 0, 0.1f),
|
||||
Colour = Color4.White,
|
||||
@ -197,18 +196,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
private float textSize = 28;
|
||||
public float TextSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return textSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
textSize = value;
|
||||
spriteText.TextSize = value;
|
||||
}
|
||||
get => spriteText.Font.Size;
|
||||
set => spriteText.Font = spriteText.Font.With(size: value);
|
||||
}
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
@ -85,7 +85,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Depth = -1,
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
TextSize = text_size,
|
||||
Font = OsuFont.GetFont(size: text_size),
|
||||
Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL },
|
||||
},
|
||||
BoldText = new OsuSpriteText
|
||||
@ -158,8 +158,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Alpha = 0,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
TextSize = text_size,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding { Horizontal = margin_horizontal, Vertical = MARGIN_VERTICAL },
|
||||
}
|
||||
};
|
||||
|
@ -159,7 +159,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Text = (value as IHasDescription)?.Description ?? (value as Enum)?.GetDescription() ?? value.ToString(),
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14)
|
||||
},
|
||||
Bar = new Box
|
||||
{
|
||||
@ -173,7 +173,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
new HoverClickSounds()
|
||||
};
|
||||
|
||||
Active.BindValueChanged(e => Text.Font = e.NewValue ? "Exo2.0-Bold" : @"Exo2.0", true);
|
||||
Active.BindValueChanged(active => Text.Font = Text.Font.With(Typeface.Exo, weight: active.NewValue ? FontWeight.Bold : FontWeight.Medium), true);
|
||||
}
|
||||
|
||||
protected override void OnActivated() => fadeActive();
|
||||
|
@ -94,11 +94,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold",
|
||||
},
|
||||
text = new OsuSpriteText { Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold) },
|
||||
icon = new SpriteIcon
|
||||
{
|
||||
Size = new Vector2(14),
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override SpriteText CreatePlaceholder() => new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-MediumItalic",
|
||||
Font = OsuFont.GetFont(italics: true),
|
||||
Colour = new Color4(180, 180, 180, 255),
|
||||
Margin = new MarginPadding { Left = 2 },
|
||||
};
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
base.OnFocusLost(e);
|
||||
}
|
||||
|
||||
protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize };
|
||||
protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: CalculatedTextSize) };
|
||||
|
||||
public virtual bool OnPressed(GlobalAction action)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Text = (value as Enum)?.GetDescription() ?? value.ToString(),
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14)
|
||||
},
|
||||
box = new Box
|
||||
{
|
||||
@ -59,7 +59,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
new HoverClickSounds()
|
||||
};
|
||||
|
||||
Active.BindValueChanged(e => Text.Font = e.NewValue ? @"Exo2.0-Bold" : @"Exo2.0", true);
|
||||
Active.BindValueChanged(active => Text.Font = Text.Font.With(Typeface.Exo, weight: active.NewValue ? FontWeight.Bold : FontWeight.Medium), true);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public PercentageCounter()
|
||||
{
|
||||
DisplayedCountSpriteText.FixedWidth = true;
|
||||
DisplayedCountSpriteText.Font = DisplayedCountSpriteText.Font.With(fixedWidth: true);
|
||||
Current.Value = DisplayedCount = 1.0f;
|
||||
}
|
||||
|
||||
|
@ -61,16 +61,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public abstract void Increment(T amount);
|
||||
|
||||
private float textSize;
|
||||
|
||||
public float TextSize
|
||||
{
|
||||
get { return textSize; }
|
||||
set
|
||||
{
|
||||
textSize = value;
|
||||
DisplayedCountSpriteText.TextSize = value;
|
||||
}
|
||||
get => DisplayedCountSpriteText.Font.Size;
|
||||
set => DisplayedCountSpriteText.Font = DisplayedCountSpriteText.Font.With(size: value);
|
||||
}
|
||||
|
||||
public Color4 AccentColour
|
||||
@ -86,10 +81,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
DisplayedCountSpriteText = new OsuSpriteText
|
||||
{
|
||||
Font = @"Venera"
|
||||
},
|
||||
DisplayedCountSpriteText = new OsuSpriteText { Font = OsuFont.Numeric }
|
||||
};
|
||||
|
||||
TextSize = 40;
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// <param name="leading">How many leading zeroes the counter will have.</param>
|
||||
public ScoreCounter(uint leading = 0)
|
||||
{
|
||||
DisplayedCountSpriteText.FixedWidth = true;
|
||||
DisplayedCountSpriteText.Font = DisplayedCountSpriteText.Font.With(fixedWidth: true);
|
||||
LeadingZeroes = leading;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
@ -75,9 +76,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = @"Exo2.0-MediumItalic",
|
||||
TextSize = 22,
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
Font = OsuFont.GetFont(size: 22, italics: true),
|
||||
Text = RankPosition.ToString(),
|
||||
},
|
||||
},
|
||||
@ -137,8 +136,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
nameLabel = new OsuSpriteText
|
||||
{
|
||||
Text = user.Username,
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
TextSize = 23,
|
||||
Font = OsuFont.GetFont(size: 23, weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
@ -187,7 +185,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
Spacing = new Vector2(5f, 0f),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
scoreLabel = new GlowingSpriteText(score.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa")),
|
||||
scoreLabel = new GlowingSpriteText(score.TotalScore.ToString(@"N0"), OsuFont.Numeric.With(size: 23), Color4.White, OsuColour.FromHex(@"83ccfa")),
|
||||
RankContainer = new Container
|
||||
{
|
||||
Size = new Vector2(40f, 20f),
|
||||
@ -275,7 +273,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
private class GlowingSpriteText : Container
|
||||
{
|
||||
public GlowingSpriteText(string text, string font, int textSize, Color4 textColour, Color4 glowColour)
|
||||
public GlowingSpriteText(string text, FontUsage font, Color4 textColour, Color4 glowColour)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
@ -296,9 +294,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = font,
|
||||
FixedWidth = true,
|
||||
TextSize = textSize,
|
||||
Font = font.With(fixedWidth: true),
|
||||
Text = text,
|
||||
Colour = glowColour,
|
||||
Shadow = false,
|
||||
@ -309,9 +305,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = font,
|
||||
FixedWidth = true,
|
||||
TextSize = textSize,
|
||||
Font = font.With(fixedWidth: true),
|
||||
Text = text,
|
||||
Colour = textColour,
|
||||
Shadow = false,
|
||||
@ -369,7 +363,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
},
|
||||
},
|
||||
},
|
||||
new GlowingSpriteText(statistic.Value, @"Exo2.0-Bold", 17, Color4.White, OsuColour.FromHex(@"83ccfa"))
|
||||
new GlowingSpriteText(statistic.Value, OsuFont.GetFont(size: 17, weight: FontWeight.Bold), Color4.White, OsuColour.FromHex(@"83ccfa"))
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
AddIcon(FontAwesome.fa_exclamation_circle, cp =>
|
||||
{
|
||||
cp.TextSize = TEXT_SIZE;
|
||||
cp.Font = cp.Font.With(size: TEXT_SIZE);
|
||||
cp.Padding = new MarginPadding { Right = 10 };
|
||||
});
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
protected const float TEXT_SIZE = 22;
|
||||
|
||||
protected Placeholder()
|
||||
: base(cp => cp.TextSize = TEXT_SIZE)
|
||||
: base(cp => cp.Font = cp.Font.With(size: TEXT_SIZE))
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
private readonly List<Drawable> errorDrawables = new List<Drawable>();
|
||||
|
||||
public ErrorTextFlowContainer()
|
||||
: base(cp => { cp.TextSize = 12; })
|
||||
: base(cp => cp.Font = cp.Font.With(size: 12))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -61,10 +61,10 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 20,
|
||||
Margin = new MarginPadding { Vertical = 10 },
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = OsuFont.GetFont(size: 20),
|
||||
Text = "Let's create an account!",
|
||||
},
|
||||
usernameTextBox = new OsuTextBox
|
||||
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
usernameDescription.AddText("This will be your public presence. No profanity, no impersonation. Avoid exposing your own personal details, too!");
|
||||
|
||||
emailAddressDescription.AddText("Will be used for notifications, account verification and in the case you forget your password. No spam, ever.");
|
||||
emailAddressDescription.AddText(" Make sure to get it right!", cp => cp.Font = "Exo2.0-Bold");
|
||||
emailAddressDescription.AddText(" Make sure to get it right!", cp => cp.Font = cp.Font.With(Typeface.Exo, weight: FontWeight.Bold));
|
||||
|
||||
passwordDescription.AddText("At least ");
|
||||
characterCheckText = passwordDescription.AddText("8 characters long");
|
||||
|
@ -83,14 +83,13 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 28,
|
||||
Font = "Exo2.0-Light",
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Colour = Color4.Red,
|
||||
Font = OsuFont.GetFont(size: 28, weight: FontWeight.Light),
|
||||
Text = "Warning! 注意!",
|
||||
},
|
||||
multiAccountExplanationText = new OsuTextFlowContainer(cp => { cp.TextSize = 12; })
|
||||
multiAccountExplanationText = new OsuTextFlowContainer(cp => cp.Font = cp.Font.With(size: 12))
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y
|
||||
@ -106,7 +105,7 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
Text = "I understand. This account isn't for me.",
|
||||
Action = () => this.Push(new ScreenEntry())
|
||||
},
|
||||
furtherAssistance = new LinkFlowContainer(cp => { cp.TextSize = 12; })
|
||||
furtherAssistance = new LinkFlowContainer(cp => cp.Font = cp.Font.With(size: 12))
|
||||
{
|
||||
Margin = new MarginPadding { Top = 20 },
|
||||
Anchor = Anchor.TopCentre,
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Screens.Menu;
|
||||
@ -40,17 +41,16 @@ namespace osu.Game.Overlays.AccountCreation
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 24,
|
||||
Font = "Exo2.0-Light",
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
|
||||
Text = "New Player Registration",
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 12,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = OsuFont.GetFont(size: 12),
|
||||
Text = "let's get you started",
|
||||
},
|
||||
new SettingsButton
|
||||
|
@ -11,6 +11,8 @@ using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
@ -47,8 +49,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
fields.Children = new Drawable[]
|
||||
{
|
||||
new Field("mapped by", BeatmapSet.Metadata.Author.Username, @"Exo2.0-RegularItalic"),
|
||||
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold")
|
||||
new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(weight: FontWeight.Regular, italics: true)),
|
||||
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold))
|
||||
{
|
||||
Margin = new MarginPadding { Top = 5 },
|
||||
},
|
||||
@ -56,11 +58,11 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
if (online.Ranked.HasValue)
|
||||
{
|
||||
fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold"));
|
||||
fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
|
||||
}
|
||||
else if (online.LastUpdated.HasValue)
|
||||
{
|
||||
fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold"));
|
||||
fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +107,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private class Field : FillFlowContainer
|
||||
{
|
||||
public Field(string first, string second, string secondFont)
|
||||
public Field(string first, string second, FontUsage secondFont)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Direction = FillDirection.Horizontal;
|
||||
@ -115,13 +117,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = $"{first} ",
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = second,
|
||||
TextSize = 13,
|
||||
Font = secondFont,
|
||||
Font = secondFont.With(size: 13)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -136,9 +136,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
TextSize = 13,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Margin = new MarginPadding { Left = 10 },
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -107,15 +107,13 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold)
|
||||
},
|
||||
starRating = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
TextSize = 13,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold),
|
||||
Text = "Star Difficulty",
|
||||
Alpha = 0,
|
||||
Margin = new MarginPadding { Bottom = 1 },
|
||||
@ -309,8 +307,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Font = @"Exo2.0-SemiBoldItalic",
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -118,8 +118,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Downloading...",
|
||||
TextSize = 13,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
break;
|
||||
@ -129,8 +128,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Importing...",
|
||||
TextSize = 13,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
break;
|
||||
@ -143,14 +141,12 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Download",
|
||||
TextSize = 13,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 13, weight: FontWeight.Bold)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = BeatmapSet.Value.OnlineInfo.HasVideo && noVideo ? "without Video" : string.Empty,
|
||||
TextSize = 11,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Bold)
|
||||
},
|
||||
};
|
||||
this.FadeIn(200);
|
||||
|
@ -115,8 +115,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
title = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
TextSize = 37,
|
||||
Font = OsuFont.GetFont(size: 37, weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
externalLink = new ExternalLinkButton
|
||||
{
|
||||
@ -126,11 +125,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
}
|
||||
},
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-SemiBoldItalic",
|
||||
TextSize = 25,
|
||||
},
|
||||
artist = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, weight: FontWeight.SemiBold, italics: true) },
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -156,7 +156,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
this.FadeIn(transition_duration);
|
||||
textFlow.Clear();
|
||||
textFlow.AddText(value, s => s.TextSize = 14);
|
||||
textFlow.AddText(value, s => s.Font = s.Font.With(size: 14));
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,8 +177,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
header = new OsuSpriteText
|
||||
{
|
||||
Text = title,
|
||||
Font = @"Exo2.0-Bold",
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Shadow = false,
|
||||
Margin = new MarginPadding { Top = 20 },
|
||||
},
|
||||
|
@ -4,6 +4,7 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Users;
|
||||
@ -30,21 +31,14 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
|
||||
public float TextSize
|
||||
{
|
||||
set
|
||||
{
|
||||
if (text.TextSize == value) return;
|
||||
text.TextSize = value;
|
||||
}
|
||||
get { return text.TextSize; }
|
||||
get => text.Font.Size;
|
||||
set => text.Font = text.Font.With(size: value);
|
||||
}
|
||||
|
||||
public ClickableUsername()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Child = text = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
};
|
||||
Child = text = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true) };
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Text = $"#{index + 1}",
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
|
||||
Margin = new MarginPadding { Left = side_margin }
|
||||
},
|
||||
new DrawableFlag(score.User.Country)
|
||||
@ -87,17 +87,16 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreRight,
|
||||
Text = $@"{score.TotalScore:N0}",
|
||||
Font = @"Venera",
|
||||
Font = OsuFont.Numeric.With(fixedWidth: true),
|
||||
RelativePositionAxes = Axes.X,
|
||||
X = 0.75f,
|
||||
FixedWidth = true,
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreRight,
|
||||
Text = $@"{score.Accuracy:P2}",
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
|
||||
RelativePositionAxes = Axes.X,
|
||||
X = 0.85f
|
||||
},
|
||||
@ -106,7 +105,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Text = $"{score.Statistics[HitResult.Great]}/{score.Statistics[HitResult.Good]}/{score.Statistics[HitResult.Meh]}",
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Regular, italics: true),
|
||||
Margin = new MarginPadding { Right = side_margin }
|
||||
},
|
||||
};
|
||||
|
@ -117,8 +117,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = "#1",
|
||||
TextSize = 40,
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 40, weight: FontWeight.Bold, italics: true),
|
||||
Y = height / 4,
|
||||
Margin = new MarginPadding { Right = margin }
|
||||
},
|
||||
@ -222,15 +221,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
headerText = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Text = header,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
|
||||
},
|
||||
valueText = new OsuSpriteText
|
||||
{
|
||||
TextSize = 25,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
}
|
||||
valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, weight: FontWeight.Regular, italics: true) }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Success Rate",
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13)
|
||||
},
|
||||
successRate = new Bar
|
||||
{
|
||||
@ -79,7 +79,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopCentre,
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
},
|
||||
},
|
||||
graphLabel = new OsuSpriteText
|
||||
@ -87,7 +87,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Points of Failure",
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Margin = new MarginPadding { Vertical = 20 },
|
||||
},
|
||||
},
|
||||
|
@ -87,9 +87,8 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
Drawable effectedUsername = username = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Colour = hasBackground ? customUsernameColour : username_colours[message.Sender.Id % username_colours.Length],
|
||||
TextSize = TextSize,
|
||||
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
|
||||
};
|
||||
|
||||
if (hasBackground)
|
||||
@ -138,9 +137,7 @@ namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Font = @"Exo2.0-SemiBold",
|
||||
FixedWidth = true,
|
||||
TextSize = TextSize * 0.75f,
|
||||
Font = OsuFont.GetFont(size: TextSize * 0.75f, weight: FontWeight.Bold, fixedWidth: true)
|
||||
},
|
||||
new MessageSender(message.Sender)
|
||||
{
|
||||
@ -162,13 +159,13 @@ namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
if (Message.IsAction)
|
||||
{
|
||||
t.Font = @"Exo2.0-MediumItalic";
|
||||
t.Font = OsuFont.GetFont(italics: true);
|
||||
|
||||
if (senderHasBackground)
|
||||
t.Colour = OsuColour.FromHex(message.Sender.Colour);
|
||||
}
|
||||
|
||||
t.TextSize = TextSize;
|
||||
t.Font = t.Font.With(size: TextSize);
|
||||
})
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -89,8 +89,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
name = new OsuSpriteText
|
||||
{
|
||||
Text = channel.ToString(),
|
||||
TextSize = text_size,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.Bold),
|
||||
Shadow = false,
|
||||
},
|
||||
},
|
||||
@ -106,8 +105,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
topic = new OsuSpriteText
|
||||
{
|
||||
Text = channel.Topic,
|
||||
TextSize = text_size,
|
||||
Font = @"Exo2.0-SemiBold",
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.SemiBold),
|
||||
Shadow = false,
|
||||
},
|
||||
},
|
||||
@ -130,8 +128,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = @"0",
|
||||
TextSize = text_size,
|
||||
Font = @"Exo2.0-SemiBold",
|
||||
Font = OsuFont.GetFont(size: text_size, weight: FontWeight.SemiBold),
|
||||
Shadow = false,
|
||||
},
|
||||
},
|
||||
|
@ -7,6 +7,7 @@ using System.Linq;
|
||||
using osuTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Chat;
|
||||
|
||||
@ -48,8 +49,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
{
|
||||
header = new OsuSpriteText
|
||||
{
|
||||
TextSize = 15,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold),
|
||||
},
|
||||
ChannelFlow = new FillFlowContainer<ChannelListItem>
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Overlays.Chat.Selection
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = @"Chat Channels",
|
||||
TextSize = 20,
|
||||
Font = OsuFont.GetFont(size: 20),
|
||||
Shadow = false,
|
||||
},
|
||||
search = new HeaderSearchTextBox
|
||||
|
@ -20,8 +20,8 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
|
||||
Icon.Alpha = 0;
|
||||
|
||||
Text.TextSize = 45;
|
||||
TextBold.TextSize = 45;
|
||||
Text.Font = Text.Font.With(size: 45);
|
||||
TextBold.Font = Text.Font.With(size: 45);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -90,7 +90,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Text = value.ToString(),
|
||||
TextSize = 18,
|
||||
Font = OsuFont.GetFont(size: 18)
|
||||
},
|
||||
TextBold = new OsuSpriteText
|
||||
{
|
||||
@ -99,8 +99,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Text = value.ToString(),
|
||||
Font = @"Exo2.0-Bold",
|
||||
TextSize = 18,
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold)
|
||||
},
|
||||
CloseButton = new TabCloseButton
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
},
|
||||
},
|
||||
},
|
||||
header = new OsuTextFlowContainer(t => t.TextSize = 25)
|
||||
header = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 25))
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
Padding = new MarginPadding(15),
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
},
|
||||
body = new OsuTextFlowContainer(t => t.TextSize = 18)
|
||||
body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18))
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -75,13 +75,12 @@ namespace osu.Game.Overlays.Direct
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)),
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)),
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -127,15 +126,14 @@ namespace osu.Game.Overlays.Direct
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "mapped by ",
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Shadow = false,
|
||||
Colour = colours.Gray5,
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = SetInfo.Metadata.Author.Username,
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-SemiBoldItalic",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true),
|
||||
Shadow = false,
|
||||
Colour = colours.BlueDark,
|
||||
},
|
||||
@ -150,7 +148,7 @@ namespace osu.Game.Overlays.Direct
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = SetInfo.Metadata.Source,
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Shadow = false,
|
||||
Colour = colours.Gray5,
|
||||
Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f,
|
||||
|
@ -95,13 +95,12 @@ namespace osu.Game.Overlays.Direct
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((SetInfo.Metadata.TitleUnicode, SetInfo.Metadata.Title)),
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((SetInfo.Metadata.ArtistUnicode, SetInfo.Metadata.Artist)),
|
||||
Font = @"Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
}
|
||||
},
|
||||
@ -161,13 +160,12 @@ namespace osu.Game.Overlays.Direct
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "mapped by ",
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = SetInfo.Metadata.Author.Username,
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-SemiBoldItalic",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -176,7 +174,7 @@ namespace osu.Game.Overlays.Direct
|
||||
Text = SetInfo.Metadata.Source,
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Alpha = string.IsNullOrEmpty(SetInfo.Metadata.Source) ? 0f : 1f,
|
||||
},
|
||||
},
|
||||
|
@ -176,10 +176,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
text = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-SemiBoldItalic",
|
||||
},
|
||||
text = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.SemiBold, italics: true) },
|
||||
new SpriteIcon
|
||||
{
|
||||
Icon = icon,
|
||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Direct
|
||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"252f3a");
|
||||
|
||||
protected override DirectTab DefaultTab => DirectTab.Search;
|
||||
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", TextSize = 25 };
|
||||
protected override Drawable CreateHeaderText() => new OsuSpriteText { Text = @"osu!direct", Font = OsuFont.GetFont(size: 25) };
|
||||
protected override FontAwesome Icon => FontAwesome.fa_osu_chevron_down_o;
|
||||
|
||||
public Header()
|
||||
|
@ -105,12 +105,11 @@ namespace osu.Game.Overlays
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "Found ",
|
||||
TextSize = 15,
|
||||
Font = OsuFont.GetFont(size: 15)
|
||||
},
|
||||
resultCountsText = new OsuSpriteText
|
||||
{
|
||||
TextSize = 15,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold)
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -349,8 +349,7 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
},
|
||||
Text = new OsuSpriteText
|
||||
{
|
||||
Font = "Venera",
|
||||
TextSize = 10,
|
||||
Font = OsuFont.Numeric.With(size: 10),
|
||||
Margin = new MarginPadding(5),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -73,8 +73,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Y = 15,
|
||||
TextSize = 12,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
|
||||
Text = @"back",
|
||||
},
|
||||
}
|
||||
|
@ -63,8 +63,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Medal Unlocked".ToUpperInvariant(),
|
||||
TextSize = 24,
|
||||
Font = @"Exo2.0-Light",
|
||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
|
||||
Alpha = 0f,
|
||||
Scale = new Vector2(1f / scale_when_unlocked),
|
||||
},
|
||||
@ -84,8 +83,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = medal.Name,
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold),
|
||||
Alpha = 0f,
|
||||
Scale = new Vector2(1f / scale_when_full),
|
||||
},
|
||||
@ -107,7 +105,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
{
|
||||
s.Anchor = Anchor.TopCentre;
|
||||
s.Origin = Anchor.TopCentre;
|
||||
s.TextSize = 16;
|
||||
s.Font = s.Font.With(size: 16);
|
||||
});
|
||||
|
||||
medalContainer.OnLoadComplete = d =>
|
||||
|
@ -14,6 +14,7 @@ using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Mods
|
||||
@ -275,7 +276,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Y = 75,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
TextSize = 18,
|
||||
Font = OsuFont.GetFont(size: 18)
|
||||
},
|
||||
new HoverClickSounds()
|
||||
};
|
||||
|
@ -11,6 +11,7 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
@ -123,7 +124,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Origin = Anchor.TopLeft,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Position = new Vector2(0f, 0f),
|
||||
Font = @"Exo2.0-Bold"
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold)
|
||||
},
|
||||
ButtonsContainer = new FillFlowContainer<ModButtonEmpty>
|
||||
{
|
||||
|
@ -264,9 +264,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-Bold",
|
||||
Text = @"Gameplay Mods",
|
||||
TextSize = 22,
|
||||
Font = OsuFont.GetFont(size: 22, weight: FontWeight.Bold),
|
||||
Shadow = true,
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
@ -275,7 +274,7 @@ namespace osu.Game.Overlays.Mods
|
||||
},
|
||||
new OsuTextFlowContainer(text =>
|
||||
{
|
||||
text.TextSize = 18;
|
||||
text.Font = text.Font.With(size: 18);
|
||||
text.Shadow = true;
|
||||
})
|
||||
{
|
||||
@ -365,7 +364,7 @@ namespace osu.Game.Overlays.Mods
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = @"Score Multiplier:",
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 5,
|
||||
@ -374,8 +373,7 @@ namespace osu.Game.Overlays.Mods
|
||||
},
|
||||
MultiplierLabel = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-Bold",
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 5
|
||||
@ -383,9 +381,8 @@ namespace osu.Game.Overlays.Mods
|
||||
},
|
||||
UnrankedLabel = new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-Bold",
|
||||
Text = @"(Unranked)",
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Top = 5,
|
||||
|
@ -108,16 +108,11 @@ namespace osu.Game.Overlays.Music
|
||||
text.Clear();
|
||||
|
||||
//space after the title to put a space between the title and artist
|
||||
titleSprites = text.AddText(titleBind.Value + @" ", sprite =>
|
||||
{
|
||||
sprite.TextSize = 16;
|
||||
sprite.Font = @"Exo2.0-Regular";
|
||||
}).OfType<SpriteText>();
|
||||
titleSprites = text.AddText(titleBind.Value + @" ", sprite => sprite.Font = OsuFont.GetFont(weight: FontWeight.Regular)).OfType<SpriteText>();
|
||||
|
||||
text.AddText(artistBind.Value, sprite =>
|
||||
{
|
||||
sprite.TextSize = 14;
|
||||
sprite.Font = @"Exo2.0-Bold";
|
||||
sprite.Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold);
|
||||
sprite.Colour = artistColour;
|
||||
sprite.Padding = new MarginPadding { Top = 1 };
|
||||
});
|
||||
|
@ -107,20 +107,18 @@ namespace osu.Game.Overlays
|
||||
Origin = Anchor.BottomCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Position = new Vector2(0, 40),
|
||||
TextSize = 25,
|
||||
Font = OsuFont.GetFont(size: 25, italics: true),
|
||||
Colour = Color4.White,
|
||||
Text = @"Nothing to play",
|
||||
Font = @"Exo2.0-MediumItalic"
|
||||
},
|
||||
artist = new OsuSpriteText
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Position = new Vector2(0, 45),
|
||||
TextSize = 15,
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold, italics: true),
|
||||
Colour = Color4.White,
|
||||
Text = @"Nothing to play",
|
||||
Font = @"Exo2.0-BoldItalic"
|
||||
},
|
||||
new Container
|
||||
{
|
||||
|
@ -102,13 +102,13 @@ namespace osu.Game.Overlays.Notifications
|
||||
titleText = new OsuSpriteText
|
||||
{
|
||||
Text = title.ToUpperInvariant(),
|
||||
Font = @"Exo2.0-Black",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Black)
|
||||
},
|
||||
countText = new OsuSpriteText
|
||||
{
|
||||
Text = "3",
|
||||
Colour = colours.Yellow,
|
||||
Font = @"Exo2.0-Black",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Black)
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -115,10 +115,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
});
|
||||
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer(t =>
|
||||
{
|
||||
t.TextSize = 16;
|
||||
})
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer
|
||||
{
|
||||
Colour = OsuColour.Gray(128),
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
}
|
||||
});
|
||||
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.TextSize = 14)
|
||||
Content.Add(textDrawable = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 14))
|
||||
{
|
||||
Colour = OsuColour.Gray(128),
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -69,16 +69,14 @@ namespace osu.Game.Overlays
|
||||
textLine1 = new OsuSpriteText
|
||||
{
|
||||
Padding = new MarginPadding(10),
|
||||
Font = @"Exo2.0-Black",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Black),
|
||||
Spacing = new Vector2(1, 0),
|
||||
TextSize = 14,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
},
|
||||
textLine2 = new OsuSpriteText
|
||||
{
|
||||
TextSize = 24,
|
||||
Font = @"Exo2.0-Light",
|
||||
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Light),
|
||||
Padding = new MarginPadding { Left = 10, Right = 10 },
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
@ -105,8 +103,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Margin = new MarginPadding { Bottom = 15 },
|
||||
Font = @"Exo2.0-Bold",
|
||||
TextSize = 12,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
|
||||
Alpha = 0.3f,
|
||||
},
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Components
|
||||
@ -36,8 +37,7 @@ namespace osu.Game.Overlays.Profile.Components
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold"
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,11 +53,10 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
{
|
||||
badgeCountText = new OsuSpriteText
|
||||
{
|
||||
Alpha = 0,
|
||||
TextSize = 12,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Font = "Exo2.0-Regular"
|
||||
Alpha = 0,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
|
||||
},
|
||||
new Container
|
||||
{
|
||||
|
@ -44,30 +44,26 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "No recent plays",
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
rankText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = primary_textsize
|
||||
Font = OsuFont.GetFont(size: primary_textsize, weight: FontWeight.Regular, italics: true),
|
||||
},
|
||||
relativeText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: secondary_textsize, weight: FontWeight.Regular, italics: true),
|
||||
Y = 25,
|
||||
TextSize = secondary_textsize
|
||||
},
|
||||
performanceText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = secondary_textsize
|
||||
Font = OsuFont.GetFont(size: secondary_textsize, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
graph = new RankChartLineGraph
|
||||
{
|
||||
|
@ -118,8 +118,7 @@ namespace osu.Game.Overlays.Profile
|
||||
usernameText = new OsuSpriteText
|
||||
{
|
||||
Text = user.Username,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
TextSize = 30,
|
||||
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
new ExternalLinkButton($@"https://osu.ppy.sh/users/{user.Id}")
|
||||
{
|
||||
@ -166,7 +165,7 @@ namespace osu.Game.Overlays.Profile
|
||||
Y = cover_height,
|
||||
Colour = OsuColour.Gray(34),
|
||||
},
|
||||
infoTextLeft = new LinkFlowContainer(t => t.TextSize = 14)
|
||||
infoTextLeft = new LinkFlowContainer(t => t.Font = t.Font.With(size: 14))
|
||||
{
|
||||
X = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||
Y = cover_height + 20,
|
||||
@ -175,11 +174,7 @@ namespace osu.Game.Overlays.Profile
|
||||
ParagraphSpacing = 0.8f,
|
||||
LineSpacing = 0.2f
|
||||
},
|
||||
infoTextRight = new LinkFlowContainer(t =>
|
||||
{
|
||||
t.TextSize = 14;
|
||||
t.Font = @"Exo2.0-RegularItalic";
|
||||
})
|
||||
infoTextRight = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14, weight: FontWeight.Regular, italics: true))
|
||||
{
|
||||
X = UserProfileOverlay.CONTENT_X_MARGIN + info_width + 20,
|
||||
Y = cover_height + 20,
|
||||
@ -222,7 +217,7 @@ namespace osu.Game.Overlays.Profile
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Y = 11,
|
||||
TextSize = 20
|
||||
Font = OsuFont.GetFont(size: 20)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -354,19 +349,18 @@ namespace osu.Game.Overlays.Profile
|
||||
colourBar.Show();
|
||||
}
|
||||
|
||||
void boldItalic(SpriteText t) => t.Font = @"Exo2.0-BoldItalic";
|
||||
void boldItalic(SpriteText t) => t.Font = t.Font.With(Typeface.Exo, weight: FontWeight.Bold, italics: true);
|
||||
void lightText(SpriteText t) => t.Alpha = 0.8f;
|
||||
|
||||
OsuSpriteText createScoreText(string text) => new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = text
|
||||
};
|
||||
|
||||
OsuSpriteText createScoreNumberText(string text) => new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Text = text
|
||||
|
@ -35,8 +35,7 @@ namespace osu.Game.Overlays.Profile
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = Title,
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Horizontal = UserProfileOverlay.CONTENT_X_MARGIN,
|
||||
@ -67,8 +66,6 @@ namespace osu.Game.Overlays.Profile
|
||||
Add(new OsuSpriteText
|
||||
{
|
||||
Text = @"coming soon!",
|
||||
TextSize = 16,
|
||||
Font = @"Exo2.0-Medium",
|
||||
Colour = Color4.Gray,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
@ -48,15 +49,13 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
Text = new LocalisedString(($"{beatmap.Metadata.TitleUnicode ?? beatmap.Metadata.Title} [{beatmap.Version}] ",
|
||||
$"{beatmap.Metadata.Title ?? beatmap.Metadata.TitleUnicode} [{beatmap.Version}] ")),
|
||||
TextSize = 15,
|
||||
Font = "Exo2.0-SemiBoldItalic",
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)),
|
||||
TextSize = 12,
|
||||
Padding = new MarginPadding { Top = 3 },
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
@ -47,7 +48,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = @"mapped by ",
|
||||
TextSize = 12,
|
||||
Font = OsuFont.GetFont(size: 12)
|
||||
},
|
||||
mapperContainer = new OsuHoverContainer
|
||||
{
|
||||
@ -57,8 +58,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = beatmap.Metadata.AuthorString,
|
||||
TextSize = 12,
|
||||
Font = @"Exo2.0-MediumItalic"
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -78,16 +78,14 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = playCount.ToString(),
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-SemiBoldItalic"
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold, italics: true)
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Text = @"times played ",
|
||||
TextSize = 12,
|
||||
Font = @"Exo2.0-RegularItalic"
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
@ -107,21 +107,19 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Text = header + ":",
|
||||
TextSize = 20,
|
||||
Font = @"Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true)
|
||||
},
|
||||
valueText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Text = "0",
|
||||
TextSize = 40,
|
||||
Font = OsuFont.GetFont(size: 40, weight: FontWeight.Regular, italics: true),
|
||||
UseFullGlyphHeight = false,
|
||||
Font = @"Exo2.0-RegularItalic"
|
||||
}
|
||||
}
|
||||
},
|
||||
new OsuTextFlowContainer(t => { t.TextSize = 19; })
|
||||
new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 19))
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -43,9 +44,8 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = 15,
|
||||
Text = header,
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Regular, italics: true),
|
||||
Margin = new MarginPadding { Top = 10, Bottom = 10 },
|
||||
},
|
||||
ItemsContainer = new FillFlowContainer
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
Origin = Anchor.TopCentre,
|
||||
Child = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = "show more",
|
||||
Padding = new MarginPadding {Vertical = 10, Horizontal = 15 },
|
||||
}
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
},
|
||||
MissingText = new OsuSpriteText
|
||||
{
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = missing,
|
||||
Alpha = 0,
|
||||
},
|
||||
|
@ -28,8 +28,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Text = $"{pp:0}pp",
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 18,
|
||||
Font = "Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
});
|
||||
|
||||
if (weight.HasValue)
|
||||
@ -40,8 +39,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Colour = colour.GrayA,
|
||||
TextSize = 11,
|
||||
Font = "Exo2.0-RegularItalic",
|
||||
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -46,8 +46,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
Colour = colour.GrayA,
|
||||
TextSize = 11,
|
||||
Font = "Exo2.0-RegularItalic"
|
||||
Font = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
|
||||
};
|
||||
|
||||
RightFlowContainer.Add(text);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
@ -23,8 +24,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
Text = Score.TotalScore.ToString("#,###"),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
TextSize = 18,
|
||||
Font = "Exo2.0-BoldItalic",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
|
||||
RightFlowContainer.Add(new DrawableDate(activity.CreatedAt)
|
||||
{
|
||||
TextSize = 13,
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Colour = OsuColour.Gray(0xAA),
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.SearchableList
|
||||
{
|
||||
public HeaderTabItem(T value) : base(value)
|
||||
{
|
||||
Text.TextSize = 16;
|
||||
Text.Font = Text.Font.With(size: 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
Text = "ACCOUNT",
|
||||
Margin = new MarginPadding { Bottom = 5 },
|
||||
Font = @"Exo2.0-Black",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Black),
|
||||
},
|
||||
form = new LoginForm
|
||||
{
|
||||
@ -134,8 +134,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = "Signed in",
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||
},
|
||||
},
|
||||
|
@ -56,14 +56,13 @@ namespace osu.Game.Overlays.Settings
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = game.Name,
|
||||
TextSize = 18,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Bold),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14),
|
||||
Text = game.Version,
|
||||
Colour = DebugUtils.IsDebug ? colours.Red : Color4.White,
|
||||
},
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Settings
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = heading,
|
||||
TextSize = 40,
|
||||
Font = OsuFont.GetFont(size: 40),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Left = SettingsOverlay.CONTENT_MARGINS,
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
Colour = colours.Pink,
|
||||
Text = subheading,
|
||||
TextSize = 18,
|
||||
Font = OsuFont.GetFont(size: 18),
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Left = SettingsOverlay.CONTENT_MARGINS,
|
||||
|
@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
TextSize = header_size,
|
||||
Font = OsuFont.GetFont(size: header_size),
|
||||
Text = Header,
|
||||
Colour = colours.Yellow,
|
||||
Margin = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }
|
||||
|
@ -8,6 +8,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
Text = Header.ToUpperInvariant(),
|
||||
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
|
||||
Font = @"Exo2.0-Black",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Black),
|
||||
},
|
||||
FlowContent
|
||||
});
|
||||
|
@ -32,13 +32,12 @@ namespace osu.Game.Overlays.Social
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = "social ",
|
||||
TextSize = 25,
|
||||
Font = OsuFont.GetFont(size: 25),
|
||||
},
|
||||
browser = new OsuSpriteText
|
||||
{
|
||||
Text = "browser",
|
||||
TextSize = 25,
|
||||
Font = @"Exo2.0-Light",
|
||||
Font = OsuFont.GetFont(size: 25, weight: FontWeight.Light),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -129,15 +129,13 @@ namespace osu.Game.Overlays.Toolbar
|
||||
Anchor = TooltipAnchor,
|
||||
Origin = TooltipAnchor,
|
||||
Shadow = true,
|
||||
TextSize = 22,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 22, weight: FontWeight.Bold),
|
||||
},
|
||||
tooltip2 = new OsuSpriteText
|
||||
{
|
||||
Anchor = TooltipAnchor,
|
||||
Origin = TooltipAnchor,
|
||||
Shadow = true,
|
||||
TextSize = 16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,11 +99,10 @@ namespace osu.Game.Overlays.Toolbar
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Y = -1,
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Padding = new MarginPadding(5),
|
||||
Colour = Color4.White,
|
||||
UseFullGlyphHeight = true,
|
||||
Font = "Exo2.0-Bold",
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
AutoSizeAxes = Axes.X;
|
||||
|
||||
DrawableText.Font = @"Exo2.0-MediumItalic";
|
||||
DrawableText.Font = OsuFont.GetFont(italics: true);
|
||||
|
||||
Add(new OpaqueBackground { Depth = 1 });
|
||||
|
||||
|
@ -140,8 +140,7 @@ namespace osu.Game.Overlays.Volume
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = "Venera",
|
||||
TextSize = 0.16f * circleSize
|
||||
Font = OsuFont.Numeric.With(size: 0.16f * circleSize)
|
||||
}).WithEffect(new GlowEffect
|
||||
{
|
||||
Colour = Color4.Transparent,
|
||||
@ -169,7 +168,7 @@ namespace osu.Game.Overlays.Volume
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = "Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = name
|
||||
}
|
||||
}
|
||||
|
@ -58,10 +58,9 @@ namespace osu.Game.Rulesets.Judgements
|
||||
Child = new SkinnableDrawable($"Play/{Result.Type}", _ => JudgementText = new OsuSpriteText
|
||||
{
|
||||
Text = Result.Type.GetDescription().ToUpperInvariant(),
|
||||
Font = @"Venera",
|
||||
Font = OsuFont.Numeric.With(size: 12),
|
||||
Colour = judgementColour(Result.Type),
|
||||
Scale = new Vector2(0.85f, 1),
|
||||
TextSize = 12
|
||||
}, restrictSize: false)
|
||||
};
|
||||
}
|
||||
|
@ -110,7 +110,8 @@ namespace osu.Game.Screens.Edit.Components.Menus
|
||||
{
|
||||
public TextContainer()
|
||||
{
|
||||
NormalText.TextSize = BoldText.TextSize = 14;
|
||||
NormalText.Font = NormalText.Font.With(size: 14);
|
||||
BoldText.Font = BoldText.Font.With(size: 14);
|
||||
NormalText.Margin = BoldText.Margin = new MarginPadding { Horizontal = 10, Vertical = MARGIN_VERTICAL };
|
||||
}
|
||||
}
|
||||
|
@ -127,15 +127,14 @@ namespace osu.Game.Screens.Edit.Components
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Text = $"{value:0%}",
|
||||
TextSize = 14,
|
||||
Font = OsuFont.GetFont(size: 14)
|
||||
},
|
||||
textBold = new OsuSpriteText
|
||||
{
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Text = $"{value:0%}",
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold),
|
||||
Alpha = 0,
|
||||
},
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components
|
||||
{
|
||||
@ -23,8 +24,7 @@ namespace osu.Game.Screens.Edit.Components
|
||||
{
|
||||
Origin = Anchor.BottomLeft,
|
||||
RelativePositionAxes = Axes.Y,
|
||||
TextSize = 22,
|
||||
FixedWidth = true,
|
||||
Font = OsuFont.GetFont(size: 22, fixedWidth: true),
|
||||
Y = 0.5f,
|
||||
}
|
||||
};
|
||||
|
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
},
|
||||
new Drawable[]
|
||||
{
|
||||
new TextFlowContainer(s => s.TextSize = 14)
|
||||
new TextFlowContainer(s => s.Font = s.Font.With(size: 14))
|
||||
{
|
||||
Padding = new MarginPadding { Horizontal = 15 },
|
||||
Text = "beat snap divisor",
|
||||
|
@ -38,8 +38,8 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
|
||||
|
||||
public float LabelTextSize
|
||||
{
|
||||
get => label.TextSize;
|
||||
set => label.TextSize = value;
|
||||
get => label.Font.Size;
|
||||
set => label.Font = label.Font.With(size: value);
|
||||
}
|
||||
|
||||
public string PlaceholderText
|
||||
@ -103,8 +103,7 @@ namespace osu.Game.Screens.Edit.Setup.Components.LabelledComponents
|
||||
Origin = Anchor.TopLeft,
|
||||
Padding = new MarginPadding { Left = default_label_left_padding, Top = default_label_top_padding },
|
||||
Colour = Color4.White,
|
||||
TextSize = default_label_text_size,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Font = OsuFont.GetFont(size: default_label_text_size, weight: FontWeight.Bold),
|
||||
},
|
||||
textBox = new OsuTextBox
|
||||
{
|
||||
|
@ -118,7 +118,6 @@ namespace osu.Game.Screens.Menu
|
||||
AllowMultiline = false,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 16,
|
||||
Position = new Vector2(0, 35),
|
||||
Text = text
|
||||
}
|
||||
|
@ -64,25 +64,13 @@ namespace osu.Game.Screens.Menu
|
||||
}
|
||||
};
|
||||
|
||||
textFlow.AddText("This is an ", t =>
|
||||
{
|
||||
t.TextSize = 30;
|
||||
t.Font = @"Exo2.0-Light";
|
||||
});
|
||||
textFlow.AddText("early development build", t =>
|
||||
{
|
||||
t.TextSize = 30;
|
||||
t.Font = @"Exo2.0-SemiBold";
|
||||
});
|
||||
textFlow.AddText("This is an ", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.Light));
|
||||
textFlow.AddText("early development build", t => t.Font = t.Font.With(Typeface.Exo, 30, FontWeight.SemiBold));
|
||||
|
||||
textFlow.AddParagraph("Things may not work as expected", t => t.TextSize = 20);
|
||||
textFlow.AddParagraph("Things may not work as expected", t => t.Font = t.Font.With(size: 20));
|
||||
textFlow.NewParagraph();
|
||||
|
||||
Action<SpriteText> format = t =>
|
||||
{
|
||||
t.TextSize = 15;
|
||||
t.Font = @"Exo2.0-SemiBold";
|
||||
};
|
||||
Action<SpriteText> format = t => t.Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold);
|
||||
|
||||
textFlow.AddParagraph("Detailed bug reports are welcomed via github issues.", format);
|
||||
textFlow.NewParagraph();
|
||||
@ -102,7 +90,7 @@ namespace osu.Game.Screens.Menu
|
||||
supporterDrawables.Add(heart = textFlow.AddIcon(FontAwesome.fa_heart, t =>
|
||||
{
|
||||
t.Padding = new MarginPadding { Left = 5 };
|
||||
t.TextSize = 12;
|
||||
t.Font = t.Font.With(size: 12);
|
||||
t.Colour = colours.Pink;
|
||||
t.Origin = Anchor.Centre;
|
||||
}).First());
|
||||
|
@ -102,9 +102,8 @@ namespace osu.Game.Screens.Menu
|
||||
Origin = Anchor.Centre,
|
||||
Text = "welcome",
|
||||
Padding = new MarginPadding { Bottom = 10 },
|
||||
Font = @"Exo2.0-Light",
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
|
||||
Alpha = 0,
|
||||
TextSize = 42,
|
||||
Spacing = new Vector2(5),
|
||||
},
|
||||
new CircularContainer
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user