1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 23:22:55 +08:00

Apply other styles.

This commit is contained in:
Huo Yaoyuan 2019-11-11 20:05:36 +08:00
parent d8482448dc
commit e9b8cbb516
14 changed files with 39 additions and 29 deletions

View File

@ -195,6 +195,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
{
if (currentObject is Fruit)
objectWithDroplets.Add(currentObject);
if (currentObject is JuiceStream)
{
foreach (var currentJuiceElement in currentObject.NestedHitObjects)

View File

@ -25,6 +25,7 @@ namespace osu.Game.Tests.Skins
var comboColors = decoder.Decode(stream).ComboColours;
List<Color4> expectedColors;
if (hasColours)
{
expectedColors = new List<Color4>

View File

@ -102,21 +102,22 @@ namespace osu.Game.Tournament.Tests.Components
Content = "Okay okay, calm down guys. Let's do this!"
}));
AddStep("multiple messages", () => testChannel.AddNewMessages(new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!"
},
new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!!!1"
},
new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!1!1"
}));
AddStep("multiple messages", () => testChannel.AddNewMessages(
new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!"
},
new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!!!1"
},
new Message(nextMessageId())
{
Sender = admin,
Content = "I spam you!1!1"
}));
AddStep("change channel to 2", () => chatDisplay.Channel.Value = testChannel2);

View File

@ -171,16 +171,16 @@ namespace osu.Game.Beatmaps.Formats
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
var endValue = split.Length > 5 ? float.Parse(split[5], CultureInfo.InvariantCulture) : startValue;
timelineGroup?.Alpha.Add(easing, startTime, endTime, startValue, endValue);
break;
}
break;
case "S":
{
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
var endValue = split.Length > 5 ? float.Parse(split[5], CultureInfo.InvariantCulture) : startValue;
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startValue), new Vector2(endValue));
break;
}
break;
case "V":
{
@ -189,16 +189,16 @@ namespace osu.Game.Beatmaps.Formats
var endX = split.Length > 6 ? float.Parse(split[6], CultureInfo.InvariantCulture) : startX;
var endY = split.Length > 7 ? float.Parse(split[7], CultureInfo.InvariantCulture) : startY;
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startX, startY), new Vector2(endX, endY));
break;
}
break;
case "R":
{
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
var endValue = split.Length > 5 ? float.Parse(split[5], CultureInfo.InvariantCulture) : startValue;
timelineGroup?.Rotation.Add(easing, startTime, endTime, MathHelper.RadiansToDegrees(startValue), MathHelper.RadiansToDegrees(endValue));
break;
}
break;
case "M":
{
@ -208,24 +208,24 @@ namespace osu.Game.Beatmaps.Formats
var endY = split.Length > 7 ? float.Parse(split[7], CultureInfo.InvariantCulture) : startY;
timelineGroup?.X.Add(easing, startTime, endTime, startX, endX);
timelineGroup?.Y.Add(easing, startTime, endTime, startY, endY);
break;
}
break;
case "MX":
{
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
var endValue = split.Length > 5 ? float.Parse(split[5], CultureInfo.InvariantCulture) : startValue;
timelineGroup?.X.Add(easing, startTime, endTime, startValue, endValue);
break;
}
break;
case "MY":
{
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
var endValue = split.Length > 5 ? float.Parse(split[5], CultureInfo.InvariantCulture) : startValue;
timelineGroup?.Y.Add(easing, startTime, endTime, startValue, endValue);
break;
}
break;
case "C":
{
@ -238,8 +238,8 @@ namespace osu.Game.Beatmaps.Formats
timelineGroup?.Colour.Add(easing, startTime, endTime,
new Color4(startRed / 255f, startGreen / 255f, startBlue / 255f, 1),
new Color4(endRed / 255f, endGreen / 255f, endBlue / 255f, 1));
break;
}
break;
case "P":
{
@ -259,14 +259,16 @@ namespace osu.Game.Beatmaps.Formats
timelineGroup?.FlipV.Add(easing, startTime, endTime, true, startTime == endTime);
break;
}
break;
}
break;
default:
throw new InvalidDataException($@"Unknown command type: {commandType}");
}
break;
}
break;
}
}
}

View File

@ -264,6 +264,7 @@ namespace osu.Game.Database
{
// for now, concatenate all .osu files in the set to create a unique hash.
MemoryStream hashable = new MemoryStream();
foreach (string file in reader.Filenames.Where(f => HashableFileTypes.Any(f.EndsWith)))
{
using (Stream s = reader.GetStream(file))

View File

@ -43,6 +43,7 @@ namespace osu.Game.Graphics.UserInterface
protected override string FormatCount(double count)
{
string format = new string('0', (int)LeadingZeroes);
if (UseCommaSeparator)
{
for (int i = format.Length - 3; i > 0; i -= 3)

View File

@ -46,8 +46,8 @@ namespace osu.Game.Input
continue;
foreach (var insertable in group.Skip(count).Take(aimCount - count))
// insert any defaults which are missing.
{
// insert any defaults which are missing.
usage.Context.DatabasedKeyBinding.Add(new DatabasedKeyBinding
{
KeyCombination = insertable.KeyCombination,

View File

@ -220,7 +220,7 @@ namespace osu.Game.Online.Chat
break;
}
var channel = availableChannels.Where(c => c.Name == content || c.Name == $"#{content}").FirstOrDefault();
var channel = availableChannels.FirstOrDefault(c => c.Name == content || c.Name == $"#{content}");
if (channel == null)
{

View File

@ -74,6 +74,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
string[] pointSplit = split[5].Split('|');
int pointCount = 1;
foreach (var t in pointSplit)
{
if (t.Length > 1)

View File

@ -334,8 +334,8 @@ namespace osu.Game.Screens.Select
if (e.NewValue is DummyWorkingBeatmap) return;
if (this.IsCurrentScreen() && !Carousel.SelectBeatmap(e.NewValue?.BeatmapInfo, false))
// If selecting new beatmap without bypassing filters failed, there's possibly a ruleset mismatch
{
// If selecting new beatmap without bypassing filters failed, there's possibly a ruleset mismatch
if (e.NewValue?.BeatmapInfo?.Ruleset != null && !e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value))
{
Ruleset.Value = e.NewValue.BeatmapInfo.Ruleset;

View File

@ -35,6 +35,7 @@ namespace osu.Game.Skinning
: base(skin)
{
Stream stream = storage?.GetStream(filename);
if (stream != null)
{
using (LineBufferedReader reader = new LineBufferedReader(stream))

View File

@ -105,6 +105,7 @@ namespace osu.Game.Storyboards
var commands = TimelineGroup.GetCommands(timelineSelector);
foreach (var loop in loops)
commands = commands.Concat(loop.GetCommands(timelineSelector));
if (triggeredGroups != null)
{
foreach (var pair in triggeredGroups)

View File

@ -37,6 +37,7 @@ namespace osu.Game.Tests.Visual
Add(testContainer = new GridContainer { RelativeSizeAxes = Axes.Both });
cells = new Drawable[rows, cols];
for (int r = 0; r < rows; r++)
{
for (int c = 0; c < cols; c++)

View File

@ -4,7 +4,6 @@
using System.Threading.Tasks;
using Foundation;
using osu.Framework.iOS;
using osu.Framework.Threading;
using UIKit;
namespace osu.iOS