1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +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
using System;
using System.Globalization;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -24,7 +23,7 @@ namespace osu.Game.Beatmaps.Drawables
if (value == status) return;
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
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using OpenTK;
using osu.Framework.Graphics;
@ -31,7 +30,7 @@ namespace osu.Game.Overlays.Chat
public string Header
{
get { return header.Text; }
set { header.Text = value.ToUpper(CultureInfo.InvariantCulture); }
set { header.Text = value.ToUpperInvariant(); }
}
public IEnumerable<Channel> Channels

View File

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

View File

@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions;
@ -56,7 +55,7 @@ namespace osu.Game.Overlays.Notifications
set
{
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
{
Text = title.ToUpper(CultureInfo.InvariantCulture),
Text = title.ToUpperInvariant(),
Font = @"Exo2.0-Black",
},
countText = new OsuSpriteText
@ -155,7 +154,7 @@ namespace osu.Game.Overlays.Notifications
public string 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.Collections.Generic;
using System.Globalization;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Configuration.Tracking;
@ -177,9 +176,9 @@ namespace osu.Game.Overlays
{
Schedule(() =>
{
textLine1.Text = description.Name.ToUpper(CultureInfo.InvariantCulture);
textLine1.Text = description.Name.ToUpperInvariant();
textLine2.Text = description.Value;
textLine3.Text = description.Shortcut.ToUpper(CultureInfo.InvariantCulture);
textLine3.Text = description.Shortcut.ToUpperInvariant();
if (string.IsNullOrEmpty(textLine3.Text))
textLine3.Text = "NO KEY BOUND";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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