1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Use ToUpperInvariant

This commit is contained in:
Dean Herbert 2018-07-24 14:42:06 +02:00
parent ab9340f4be
commit 5364a6148a
11 changed files with 15 additions and 26 deletions

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Globalization;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
@ -24,7 +23,7 @@ namespace osu.Game.Beatmaps.Drawables
if (value == status) return; if (value == status) return;
status = value; status = value;
statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpper(CultureInfo.InvariantCulture); statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpperInvariant();
} }
} }

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using OpenTK; using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -31,7 +30,7 @@ namespace osu.Game.Overlays.Chat
public string Header public string Header
{ {
get { return header.Text; } get { return header.Text; }
set { header.Text = value.ToUpper(CultureInfo.InvariantCulture); } set { header.Text = value.ToUpperInvariant(); }
} }
public IEnumerable<Channel> Channels public IEnumerable<Channel> Channels

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Globalization;
using osu.Framework; using osu.Framework;
using OpenTK; using OpenTK;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -63,7 +62,7 @@ namespace osu.Game.Overlays.MedalSplash
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "Medal Unlocked".ToUpper(CultureInfo.InvariantCulture), Text = "Medal Unlocked".ToUpperInvariant(),
TextSize = 24, TextSize = 24,
Font = @"Exo2.0-Light", Font = @"Exo2.0-Light",
Alpha = 0f, Alpha = 0f,

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
@ -56,7 +55,7 @@ namespace osu.Game.Overlays.Notifications
set set
{ {
title = value; title = value;
if (titleText != null) titleText.Text = title.ToUpper(CultureInfo.InvariantCulture); if (titleText != null) titleText.Text = title.ToUpperInvariant();
} }
} }
@ -102,7 +101,7 @@ namespace osu.Game.Overlays.Notifications
{ {
titleText = new OsuSpriteText titleText = new OsuSpriteText
{ {
Text = title.ToUpper(CultureInfo.InvariantCulture), Text = title.ToUpperInvariant(),
Font = @"Exo2.0-Black", Font = @"Exo2.0-Black",
}, },
countText = new OsuSpriteText countText = new OsuSpriteText
@ -155,7 +154,7 @@ namespace osu.Game.Overlays.Notifications
public string Text public string Text
{ {
get { return text.Text; } get { return text.Text; }
set { text.Text = value.ToUpper(CultureInfo.InvariantCulture); } set { text.Text = value.ToUpperInvariant(); }
} }
} }

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Configuration.Tracking; using osu.Framework.Configuration.Tracking;
@ -177,9 +176,9 @@ namespace osu.Game.Overlays
{ {
Schedule(() => Schedule(() =>
{ {
textLine1.Text = description.Name.ToUpper(CultureInfo.InvariantCulture); textLine1.Text = description.Name.ToUpperInvariant();
textLine2.Text = description.Value; textLine2.Text = description.Value;
textLine3.Text = description.Shortcut.ToUpper(CultureInfo.InvariantCulture); textLine3.Text = description.Shortcut.ToUpperInvariant();
if (string.IsNullOrEmpty(textLine3.Text)) if (string.IsNullOrEmpty(textLine3.Text))
textLine3.Text = "NO KEY BOUND"; textLine3.Text = "NO KEY BOUND";

View File

@ -6,7 +6,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -52,7 +51,7 @@ namespace osu.Game.Overlays.Settings
{ {
new OsuSpriteText new OsuSpriteText
{ {
Text = Header.ToUpper(CultureInfo.InvariantCulture), Text = Header.ToUpperInvariant(),
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }, Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
Font = @"Exo2.0-Black", Font = @"Exo2.0-Black",
}, },

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Globalization;
using OpenTK; using OpenTK;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions; using osu.Framework.Extensions;
@ -52,7 +51,7 @@ namespace osu.Game.Rulesets.Judgements
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
{ {
Text = Judgement.Result.GetDescription().ToUpper(CultureInfo.InvariantCulture), Text = Judgement.Result.GetDescription().ToUpperInvariant(),
Font = @"Venera", Font = @"Venera",
Colour = judgementColour(Judgement.Result), Colour = judgementColour(Judgement.Result),
Scale = new Vector2(0.85f, 1), Scale = new Vector2(0.85f, 1),

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Globalization;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -29,7 +28,7 @@ namespace osu.Game.Screens.Play.Break
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = "current progress".ToUpper(CultureInfo.InvariantCulture), Text = "current progress".ToUpperInvariant(),
TextSize = 15, TextSize = 15,
Font = "Exo2.0-Black", Font = "Exo2.0-Black",
}, },

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Globalization;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -95,7 +94,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
{ {
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Text = Title.ToUpper(CultureInfo.InvariantCulture), Text = Title.ToUpperInvariant(),
TextSize = 17, TextSize = 17,
Font = @"Exo2.0-Bold", Font = @"Exo2.0-Bold",
Margin = new MarginPadding { Left = 10 }, Margin = new MarginPadding { Left = 10 },

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -324,7 +323,7 @@ namespace osu.Game.Screens.Tournament
if (string.IsNullOrEmpty(line)) if (string.IsNullOrEmpty(line))
continue; continue;
if (line.ToUpper(CultureInfo.InvariantCulture).StartsWith("GROUP")) if (line.ToUpperInvariant().StartsWith("GROUP"))
continue; continue;
// ReSharper disable once AccessToModifiedClosure // ReSharper disable once AccessToModifiedClosure

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -52,7 +51,7 @@ namespace osu.Game.Screens.Tournament
Position = new Vector2(0, 7f), Position = new Vector2(0, 7f),
Text = $"GROUP {name.ToUpper(CultureInfo.InvariantCulture)}", Text = $"GROUP {name.ToUpperInvariant()}",
TextSize = 8f, TextSize = 8f,
Font = @"Exo2.0-Bold", Font = @"Exo2.0-Bold",
Colour = new Color4(255, 204, 34, 255), Colour = new Color4(255, 204, 34, 255),
@ -162,7 +161,7 @@ namespace osu.Game.Screens.Tournament
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
Text = team.Acronym.ToUpper(CultureInfo.InvariantCulture), Text = team.Acronym.ToUpperInvariant(),
TextSize = 10f, TextSize = 10f,
Font = @"Exo2.0-Bold" Font = @"Exo2.0-Bold"
} }