mirror of
https://github.com/ppy/osu.git
synced 2025-01-09 05:29:04 +08:00
commit
5651b54dce
@ -51,7 +51,7 @@
|
|||||||
<Reference Include="Java.Interop" />
|
<Reference Include="Java.Interop" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.304.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.302.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.302.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
@ -175,7 +175,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
X = (flip ? -1 : 1) * 90,
|
X = (flip ? -1 : 1) * 90,
|
||||||
Y = -10,
|
Y = -10,
|
||||||
Colour = colour,
|
Colour = colour,
|
||||||
Font = TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Regular, size: 20),
|
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 20),
|
||||||
Origin = anchor,
|
Origin = anchor,
|
||||||
Anchor = anchor,
|
Anchor = anchor,
|
||||||
},
|
},
|
||||||
@ -211,7 +211,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round",
|
Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round",
|
||||||
Font = TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Regular, size: 18),
|
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 18),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -123,8 +123,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
public bool Winning
|
public bool Winning
|
||||||
{
|
{
|
||||||
set => DisplayedCountSpriteText.Font = value
|
set => DisplayedCountSpriteText.Font = value
|
||||||
? TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Regular, size: 60)
|
? OsuFont.Torus.With(weight: FontWeight.Regular, size: 60)
|
||||||
: TournamentFont.GetFont(typeface: TournamentTypeface.Aquatico, weight: FontWeight.Light, size: 40);
|
: OsuFont.Torus.With(weight: FontWeight.Light, size: 40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
Text = team?.FullName.Value.ToUpper() ?? "???",
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 40, FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
@ -209,7 +209,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = teamName.ToUpper(),
|
Text = teamName.ToUpper(),
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 20, FontWeight.Regular),
|
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Regular),
|
||||||
Colour = colour,
|
Colour = colour,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Colour = col,
|
Colour = col,
|
||||||
Text = "WINNER",
|
Text = "WINNER",
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 15, FontWeight.Regular),
|
Font = OsuFont.Torus.With(size: 15, weight: FontWeight.Regular),
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Colour = col,
|
Colour = col,
|
||||||
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 50, FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 50, weight: FontWeight.Light),
|
||||||
Spacing = new Vector2(10, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
@ -143,7 +143,7 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Colour = col,
|
Colour = col,
|
||||||
Text = match.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"),
|
Text = match.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"),
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 20, FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Light),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
Text = team?.FullName.Value.ToUpper() ?? "???",
|
||||||
Font = TournamentFont.GetFont(TournamentTypeface.Aquatico, 40, FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
// 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;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Tournament
|
|
||||||
{
|
|
||||||
public static class TournamentFont
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The default font size.
|
|
||||||
/// </summary>
|
|
||||||
public const float DEFAULT_FONT_SIZE = 16;
|
|
||||||
|
|
||||||
/// <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(TournamentTypeface typeface = TournamentTypeface.Aquatico, 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="TournamentTypeface"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="typeface">The <see cref="TournamentTypeface"/>.</param>
|
|
||||||
/// <returns>The string representation.</returns>
|
|
||||||
public static string GetFamilyString(TournamentTypeface typeface)
|
|
||||||
{
|
|
||||||
switch (typeface)
|
|
||||||
{
|
|
||||||
case TournamentTypeface.Aquatico:
|
|
||||||
return "Aquatico";
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="typeface">The <see cref="TournamentTypeface"/>.</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(TournamentTypeface typeface, FontWeight weight)
|
|
||||||
=> GetWeightString(GetFamilyString(typeface), weight);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Retrieves the string representation of a <see cref="FontWeight"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="family">The family string.</param>
|
|
||||||
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
|
||||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="family"/>.</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 (weight == FontWeight.Regular && family != GetFamilyString(TournamentTypeface.Aquatico))
|
|
||||||
weightString = string.Empty;
|
|
||||||
|
|
||||||
return weightString;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum TournamentTypeface
|
|
||||||
{
|
|
||||||
Aquatico
|
|
||||||
}
|
|
||||||
}
|
|
@ -54,9 +54,6 @@ namespace osu.Game.Tournament
|
|||||||
{
|
{
|
||||||
Resources.AddStore(new DllResourceStore(typeof(TournamentGameBase).Assembly));
|
Resources.AddStore(new DllResourceStore(typeof(TournamentGameBase).Assembly));
|
||||||
|
|
||||||
AddFont(Resources, @"Resources/Fonts/Aquatico-Regular");
|
|
||||||
AddFont(Resources, @"Resources/Fonts/Aquatico-Light");
|
|
||||||
|
|
||||||
Textures.AddStore(new TextureLoaderStore(new ResourceStore<byte[]>(new StorageBackedResourceStore(storage))));
|
Textures.AddStore(new TextureLoaderStore(new ResourceStore<byte[]>(new StorageBackedResourceStore(storage))));
|
||||||
|
|
||||||
this.storage = storage;
|
this.storage = storage;
|
||||||
|
@ -17,7 +17,9 @@ namespace osu.Game.Graphics
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static FontUsage Default => GetFont();
|
public static FontUsage Default => GetFont();
|
||||||
|
|
||||||
public static FontUsage Numeric => GetFont(Typeface.Venera, weight: FontWeight.Regular);
|
public static FontUsage Numeric => GetFont(Typeface.Venera, weight: FontWeight.Bold);
|
||||||
|
|
||||||
|
public static FontUsage Torus => GetFont(Typeface.Torus, weight: FontWeight.Regular);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves a <see cref="FontUsage"/>.
|
/// Retrieves a <see cref="FontUsage"/>.
|
||||||
@ -45,6 +47,9 @@ namespace osu.Game.Graphics
|
|||||||
|
|
||||||
case Typeface.Venera:
|
case Typeface.Venera:
|
||||||
return "Venera";
|
return "Venera";
|
||||||
|
|
||||||
|
case Typeface.Torus:
|
||||||
|
return "Torus";
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -65,16 +70,7 @@ namespace osu.Game.Graphics
|
|||||||
/// <param name="family">The family string.</param>
|
/// <param name="family">The family string.</param>
|
||||||
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
/// <param name="weight">The <see cref="FontWeight"/>.</param>
|
||||||
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="family"/>.</returns>
|
/// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="family"/>.</returns>
|
||||||
public static string GetWeightString(string family, FontWeight weight)
|
public static string GetWeightString(string family, FontWeight weight) => weight.ToString();
|
||||||
{
|
|
||||||
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
|
public static class OsuFontExtensions
|
||||||
@ -102,15 +98,39 @@ namespace osu.Game.Graphics
|
|||||||
{
|
{
|
||||||
Exo,
|
Exo,
|
||||||
Venera,
|
Venera,
|
||||||
|
Torus
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FontWeight
|
public enum FontWeight
|
||||||
{
|
{
|
||||||
Light,
|
/// <summary>
|
||||||
Regular,
|
/// Equivalent to weight 300.
|
||||||
Medium,
|
/// </summary>
|
||||||
SemiBold,
|
Light = 300,
|
||||||
Bold,
|
|
||||||
Black
|
/// <summary>
|
||||||
|
/// Equivalent to weight 400.
|
||||||
|
/// </summary>
|
||||||
|
Regular = 400,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Equivalent to weight 500.
|
||||||
|
/// </summary>
|
||||||
|
Medium = 500,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Equivalent to weight 600.
|
||||||
|
/// </summary>
|
||||||
|
SemiBold = 600,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Equivalent to weight 700.
|
||||||
|
/// </summary>
|
||||||
|
Bold = 700,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Equivalent to weight 900.
|
||||||
|
/// </summary>
|
||||||
|
Black = 900
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
Spacing = new Vector2(-3, 0),
|
Spacing = new Vector2(-3, 0),
|
||||||
Padding = new MarginPadding { Top = 5 },
|
Padding = new MarginPadding { Top = 5 },
|
||||||
Colour = getRankNameColour(),
|
Colour = getRankNameColour(),
|
||||||
Font = OsuFont.GetFont(Typeface.Venera, 25),
|
Font = OsuFont.Numeric.With(size: 25),
|
||||||
Text = getRankName(),
|
Text = getRankName(),
|
||||||
ShadowColour = Color4.Black.Opacity(0.3f),
|
ShadowColour = Color4.Black.Opacity(0.3f),
|
||||||
ShadowOffset = new Vector2(0, 0.08f),
|
ShadowOffset = new Vector2(0, 0.08f),
|
||||||
|
@ -157,9 +157,14 @@ namespace osu.Game
|
|||||||
AddFont(Resources, @"Fonts/Exo2.0-Black");
|
AddFont(Resources, @"Fonts/Exo2.0-Black");
|
||||||
AddFont(Resources, @"Fonts/Exo2.0-BlackItalic");
|
AddFont(Resources, @"Fonts/Exo2.0-BlackItalic");
|
||||||
|
|
||||||
AddFont(Resources, @"Fonts/Venera");
|
AddFont(Resources, @"Fonts/Torus-SemiBold");
|
||||||
|
AddFont(Resources, @"Fonts/Torus-Bold");
|
||||||
|
AddFont(Resources, @"Fonts/Torus-Regular");
|
||||||
|
AddFont(Resources, @"Fonts/Torus-Light");
|
||||||
|
|
||||||
AddFont(Resources, @"Fonts/Venera-Light");
|
AddFont(Resources, @"Fonts/Venera-Light");
|
||||||
AddFont(Resources, @"Fonts/Venera-Medium");
|
AddFont(Resources, @"Fonts/Venera-Bold");
|
||||||
|
AddFont(Resources, @"Fonts/Venera-Black");
|
||||||
|
|
||||||
runMigrations();
|
runMigrations();
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.304.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2020.302.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2020.302.0" />
|
||||||
<PackageReference Include="Sentry" Version="2.1.0" />
|
<PackageReference Include="Sentry" Version="2.1.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.304.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.302.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.302.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
||||||
|
Loading…
Reference in New Issue
Block a user