mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Merge branch 'master' into open-downloaded-beatmas
This commit is contained in:
commit
b7de922896
@ -52,6 +52,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
{
|
||||
void runAfterLoaded(Action action)
|
||||
{
|
||||
if (lastPlateableFruit == null)
|
||||
return;
|
||||
|
||||
// this is required to make this run after the last caught fruit runs UpdateState at least once.
|
||||
// TODO: find a better alternative
|
||||
if (lastPlateableFruit.IsLoaded)
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
return new ScrollingTestContainer(direction)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Child = new NoteContainer(direction, $"note, scrolling {direction.ToString().ToLower()}")
|
||||
Child = new NoteContainer(direction, $"note, scrolling {direction.ToString().ToLowerInvariant()}")
|
||||
{
|
||||
Child = new DrawableNote(note) { AccentColour = Color4.OrangeRed }
|
||||
}
|
||||
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
return new ScrollingTestContainer(direction)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Child = new NoteContainer(direction, $"hold note, scrolling {direction.ToString().ToLower()}")
|
||||
Child = new NoteContainer(direction, $"hold note, scrolling {direction.ToString().ToLowerInvariant()}")
|
||||
{
|
||||
Child = new DrawableHoldNote(note)
|
||||
{
|
||||
|
@ -1,11 +1,13 @@
|
||||
// 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;
|
||||
using System.ComponentModel;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Framework.Graphics;
|
||||
using System.Linq;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
@ -32,7 +34,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
UpdatePreemptState();
|
||||
|
||||
using (BeginDelayedSequence(HitObject.TimePreempt + (Judgements.FirstOrDefault()?.TimeOffset ?? 0), true))
|
||||
var judgementOffset = Math.Min(HitObject.HitWindows.HalfWindowFor(HitResult.Miss), Judgements.FirstOrDefault()?.TimeOffset ?? 0);
|
||||
|
||||
using (BeginDelayedSequence(HitObject.TimePreempt + judgementOffset, true))
|
||||
UpdateCurrentState(state);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -21,15 +22,18 @@ namespace osu.Game.Tests.Visual
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
Child = new Container
|
||||
{
|
||||
new LabelledTextBox
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Padding = new MarginPadding { Left = 150, Right = 150 },
|
||||
Child = new LabelledTextBox
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
LabelText = "Testing text",
|
||||
PlaceholderText = "This is definitely working as intended",
|
||||
Padding = new MarginPadding { Left = 150, Right = 150 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
if (value == status) return;
|
||||
status = value;
|
||||
|
||||
statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpper();
|
||||
statusText.Text = Enum.GetName(typeof(BeatmapSetOnlineStatus), Status)?.ToUpperInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
omitFirstBarSignature = effectFlags.HasFlag(EffectFlags.OmitFirstBarLine);
|
||||
}
|
||||
|
||||
string stringSampleSet = sampleSet.ToString().ToLower();
|
||||
string stringSampleSet = sampleSet.ToString().ToLowerInvariant();
|
||||
if (stringSampleSet == @"none")
|
||||
stringSampleSet = @"normal";
|
||||
|
||||
|
@ -134,7 +134,7 @@ namespace osu.Game.Graphics
|
||||
private string getFileName()
|
||||
{
|
||||
var dt = DateTime.Now;
|
||||
var fileExt = screenshotFormat.ToString().ToLower();
|
||||
var fileExt = screenshotFormat.ToString().ToLowerInvariant();
|
||||
|
||||
var withoutIndex = $"osu_{dt:yyyy-MM-dd_HH-mm-ss}.{fileExt}";
|
||||
if (!storage.Exists(withoutIndex))
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Online.API.Requests
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
protected override string Target => $@"users/{userId}/scores/{type.ToString().ToLower()}?offset={offset}";
|
||||
protected override string Target => $@"users/{userId}/scores/{type.ToString().ToLowerInvariant()}?offset={offset}";
|
||||
}
|
||||
|
||||
public enum ScoreType
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Online.API.Requests
|
||||
req.Method = HttpMethod.POST;
|
||||
req.AddParameter(@"target_type", message.TargetType.GetDescription());
|
||||
req.AddParameter(@"target_id", message.TargetId.ToString());
|
||||
req.AddParameter(@"is_action", message.IsAction.ToString().ToLower());
|
||||
req.AddParameter(@"is_action", message.IsAction.ToString().ToLowerInvariant());
|
||||
req.AddParameter(@"message", message.Content);
|
||||
|
||||
return req;
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Online.API.Requests
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={(int)searchCategory}&sort={sortCriteria.ToString().ToLower()}_{directionString}";
|
||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={(int)searchCategory}&sort={sortCriteria.ToString().ToLowerInvariant()}_{directionString}";
|
||||
}
|
||||
|
||||
public enum BeatmapSearchCategory
|
||||
|
@ -586,10 +586,10 @@ namespace osu.Game
|
||||
|
||||
// we only want to apply these restrictions when we are inside a screen stack.
|
||||
// the use case for not applying is in visual/unit tests.
|
||||
bool applyRestrictions = !currentScreen?.AllowBeatmapRulesetChange ?? false;
|
||||
bool applyBeatmapRulesetRestrictions = !currentScreen?.AllowBeatmapRulesetChange ?? false;
|
||||
|
||||
ruleset.Disabled = applyRestrictions;
|
||||
Beatmap.Disabled = applyRestrictions;
|
||||
ruleset.Disabled = applyBeatmapRulesetRestrictions;
|
||||
Beatmap.Disabled = applyBeatmapRulesetRestrictions;
|
||||
|
||||
mainContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Chat
|
||||
public string Header
|
||||
{
|
||||
get { return header.Text; }
|
||||
set { header.Text = value.ToUpper(); }
|
||||
set { header.Text = value.ToUpperInvariant(); }
|
||||
}
|
||||
|
||||
public IEnumerable<Channel> Channels
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Medal Unlocked".ToUpper(),
|
||||
Text = "Medal Unlocked".ToUpperInvariant(),
|
||||
TextSize = 24,
|
||||
Font = @"Exo2.0-Light",
|
||||
Alpha = 0f,
|
||||
|
@ -183,7 +183,7 @@ namespace osu.Game.Overlays
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Height = progress_height,
|
||||
FillColour = colours.Yellow,
|
||||
OnSeek = progress => current?.Track.Seek(progress)
|
||||
OnSeek = attemptSeek
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -198,6 +198,12 @@ namespace osu.Game.Overlays
|
||||
playlist.StateChanged += s => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void attemptSeek(double progress)
|
||||
{
|
||||
if (!beatmap.Disabled)
|
||||
current?.Track.Seek(progress);
|
||||
}
|
||||
|
||||
private void playlistOrderChanged(BeatmapSetInfo beatmapSetInfo, int index)
|
||||
{
|
||||
beatmapSets.Remove(beatmapSetInfo);
|
||||
@ -219,6 +225,7 @@ namespace osu.Game.Overlays
|
||||
if (disabled)
|
||||
playlist.Hide();
|
||||
|
||||
playButton.Enabled.Value = !disabled;
|
||||
prevButton.Enabled.Value = !disabled;
|
||||
nextButton.Enabled.Value = !disabled;
|
||||
playlistButton.Enabled.Value = !disabled;
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
set
|
||||
{
|
||||
title = value;
|
||||
if (titleText != null) titleText.Text = title.ToUpper();
|
||||
if (titleText != null) titleText.Text = title.ToUpperInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
{
|
||||
titleText = new OsuSpriteText
|
||||
{
|
||||
Text = title.ToUpper(),
|
||||
Text = title.ToUpperInvariant(),
|
||||
Font = @"Exo2.0-Black",
|
||||
},
|
||||
countText = new OsuSpriteText
|
||||
@ -154,7 +154,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
public string Text
|
||||
{
|
||||
get { return text.Text; }
|
||||
set { text.Text = value.ToUpper(); }
|
||||
set { text.Text = value.ToUpperInvariant(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,9 +176,9 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
textLine1.Text = description.Name.ToUpper();
|
||||
textLine1.Text = description.Name.ToUpperInvariant();
|
||||
textLine2.Text = description.Value;
|
||||
textLine3.Text = description.Shortcut.ToUpper();
|
||||
textLine3.Text = description.Shortcut.ToUpperInvariant();
|
||||
|
||||
if (string.IsNullOrEmpty(textLine3.Text))
|
||||
textLine3.Text = "NO KEY BOUND";
|
||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = Header.ToUpper(),
|
||||
Text = Header.ToUpperInvariant(),
|
||||
Margin = new MarginPadding { Bottom = 10, Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS },
|
||||
Font = @"Exo2.0-Black",
|
||||
},
|
||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
|
||||
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
|
||||
{
|
||||
Text = Judgement.Result.GetDescription().ToUpper(),
|
||||
Text = Judgement.Result.GetDescription().ToUpperInvariant(),
|
||||
Font = @"Venera",
|
||||
Colour = judgementColour(Judgement.Result),
|
||||
Scale = new Vector2(0.85f, 1),
|
||||
|
@ -197,10 +197,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
var bank = (LegacyBeatmapDecoder.LegacySampleBank)int.Parse(split[0]);
|
||||
var addbank = (LegacyBeatmapDecoder.LegacySampleBank)int.Parse(split[1]);
|
||||
|
||||
string stringBank = bank.ToString().ToLower();
|
||||
string stringBank = bank.ToString().ToLowerInvariant();
|
||||
if (stringBank == @"none")
|
||||
stringBank = null;
|
||||
string stringAddBank = addbank.ToString().ToLower();
|
||||
string stringAddBank = addbank.ToString().ToLowerInvariant();
|
||||
if (stringAddBank == @"none")
|
||||
stringAddBank = null;
|
||||
|
||||
|
@ -16,8 +16,7 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
||||
public class LabelledTextBox : CompositeDrawable
|
||||
{
|
||||
private const float label_container_width = 150;
|
||||
private const float outer_corner_radius = 15;
|
||||
private const float inner_corner_radius = 10;
|
||||
private const float corner_radius = 15;
|
||||
private const float default_height = 40;
|
||||
private const float default_label_left_padding = 15;
|
||||
private const float default_label_top_padding = 12;
|
||||
@ -55,24 +54,6 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
||||
set => textBox.Text = value;
|
||||
}
|
||||
|
||||
public MarginPadding Padding
|
||||
{
|
||||
get => base.Padding;
|
||||
set => base.Padding = value;
|
||||
}
|
||||
|
||||
public MarginPadding LabelPadding
|
||||
{
|
||||
get => label.Padding;
|
||||
set => label.Padding = value;
|
||||
}
|
||||
|
||||
public MarginPadding TextBoxPadding
|
||||
{
|
||||
get => textBox.Padding;
|
||||
set => textBox.Padding = value;
|
||||
}
|
||||
|
||||
public Color4 LabelTextColour
|
||||
{
|
||||
get => label.Colour;
|
||||
@ -93,13 +74,13 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = default_height;
|
||||
CornerRadius = outer_corner_radius;
|
||||
CornerRadius = corner_radius;
|
||||
Masking = true;
|
||||
|
||||
InternalChild = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CornerRadius = outer_corner_radius,
|
||||
CornerRadius = corner_radius,
|
||||
Masking = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -131,7 +112,7 @@ namespace osu.Game.Screens.Edit.Screens.Setup.Components.LabelledComponents
|
||||
Origin = Anchor.TopLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Height = 1,
|
||||
CornerRadius = inner_corner_radius,
|
||||
CornerRadius = corner_radius,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Screens.Multi
|
||||
},
|
||||
};
|
||||
|
||||
breadcrumbs.Current.ValueChanged += s => screenType.Text = ((MultiplayerScreen)s).Type.ToLower();
|
||||
breadcrumbs.Current.ValueChanged += s => screenType.Text = ((MultiplayerScreen)s).Type.ToLowerInvariant();
|
||||
breadcrumbs.Current.TriggerChange();
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Play.Break
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "current progress".ToUpper(),
|
||||
Text = "current progress".ToUpperInvariant(),
|
||||
TextSize = 15,
|
||||
Font = "Exo2.0-Black",
|
||||
},
|
||||
|
@ -139,7 +139,7 @@ namespace osu.Game.Screens.Play
|
||||
adjustableClock = new DecoupleableInterpolatingFramedClock { IsCoupled = false };
|
||||
|
||||
adjustableClock.Seek(AllowLeadIn
|
||||
? Math.Min(RulesetContainer.GameplayStartTime, beatmap.HitObjects.First().StartTime - beatmap.BeatmapInfo.AudioLeadIn)
|
||||
? Math.Min(0, RulesetContainer.GameplayStartTime - beatmap.BeatmapInfo.AudioLeadIn)
|
||||
: RulesetContainer.GameplayStartTime);
|
||||
|
||||
adjustableClock.ProcessFrame();
|
||||
|
@ -94,7 +94,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
{
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Text = Title.ToUpper(),
|
||||
Text = Title.ToUpperInvariant(),
|
||||
TextSize = 17,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Margin = new MarginPadding { Left = 10 },
|
||||
|
@ -323,7 +323,7 @@ namespace osu.Game.Screens.Tournament
|
||||
if (string.IsNullOrEmpty(line))
|
||||
continue;
|
||||
|
||||
if (line.ToUpper().StartsWith("GROUP"))
|
||||
if (line.ToUpperInvariant().StartsWith("GROUP"))
|
||||
continue;
|
||||
|
||||
// ReSharper disable once AccessToModifiedClosure
|
||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
Position = new Vector2(0, 7f),
|
||||
|
||||
Text = $"GROUP {name.ToUpper()}",
|
||||
Text = $"GROUP {name.ToUpperInvariant()}",
|
||||
TextSize = 8f,
|
||||
Font = @"Exo2.0-Bold",
|
||||
Colour = new Color4(255, 204, 34, 255),
|
||||
@ -161,7 +161,7 @@ namespace osu.Game.Screens.Tournament
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
||||
Text = team.Acronym.ToUpper(),
|
||||
Text = team.Acronym.ToUpperInvariant(),
|
||||
TextSize = 10f,
|
||||
Font = @"Exo2.0-Bold"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user