mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 00:02:54 +08:00
Merge branch 'master' into mania-column-line-colour
This commit is contained in:
commit
c35dd0153d
@ -52,6 +52,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.331.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.331.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.401.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.402.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
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;
|
||||||
using osu.Framework.Timing;
|
|
||||||
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -37,10 +36,13 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
Child = new ScrollingHitObjectContainer
|
Child = new ScrollingHitObjectContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Clock = new FramedClock(new StopwatchClock()),
|
|
||||||
}.With(c =>
|
}.With(c =>
|
||||||
{
|
{
|
||||||
c.Add(CreateHitObject().With(h => h.AccentColour.Value = Color4.Orange));
|
c.Add(CreateHitObject().With(h =>
|
||||||
|
{
|
||||||
|
h.HitObject.StartTime = START_TIME;
|
||||||
|
h.AccentColour.Value = Color4.Orange;
|
||||||
|
}));
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
new ColumnTestContainer(1, ManiaAction.Key2)
|
new ColumnTestContainer(1, ManiaAction.Key2)
|
||||||
@ -52,10 +54,13 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
Child = new ScrollingHitObjectContainer
|
Child = new ScrollingHitObjectContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Clock = new FramedClock(new StopwatchClock()),
|
|
||||||
}.With(c =>
|
}.With(c =>
|
||||||
{
|
{
|
||||||
c.Add(CreateHitObject().With(h => h.AccentColour.Value = Color4.Orange));
|
c.Add(CreateHitObject().With(h =>
|
||||||
|
{
|
||||||
|
h.HitObject.StartTime = START_TIME;
|
||||||
|
h.AccentColour.Value = Color4.Orange;
|
||||||
|
}));
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,8 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class ManiaSkinnableTestScene : SkinnableTestScene
|
public abstract class ManiaSkinnableTestScene : SkinnableTestScene
|
||||||
{
|
{
|
||||||
|
protected const double START_TIME = 1000000000;
|
||||||
|
|
||||||
[Cached(Type = typeof(IScrollingInfo))]
|
[Cached(Type = typeof(IScrollingInfo))]
|
||||||
private readonly TestScrollingInfo scrollingInfo = new TestScrollingInfo();
|
private readonly TestScrollingInfo scrollingInfo = new TestScrollingInfo();
|
||||||
|
|
||||||
@ -52,7 +54,26 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
|
|
||||||
IBindable<ScrollingDirection> IScrollingInfo.Direction => Direction;
|
IBindable<ScrollingDirection> IScrollingInfo.Direction => Direction;
|
||||||
IBindable<double> IScrollingInfo.TimeRange { get; } = new Bindable<double>(1000);
|
IBindable<double> IScrollingInfo.TimeRange { get; } = new Bindable<double>(1000);
|
||||||
IScrollAlgorithm IScrollingInfo.Algorithm { get; } = new ConstantScrollAlgorithm();
|
IScrollAlgorithm IScrollingInfo.Algorithm { get; } = new ZeroScrollAlgorithm();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ZeroScrollAlgorithm : IScrollAlgorithm
|
||||||
|
{
|
||||||
|
public double GetDisplayStartTime(double originTime, float offset, double timeRange, float scrollLength)
|
||||||
|
=> double.MinValue;
|
||||||
|
|
||||||
|
public float GetLength(double startTime, double endTime, double timeRange, float scrollLength)
|
||||||
|
=> scrollLength;
|
||||||
|
|
||||||
|
public float PositionAt(double time, double currentTime, double timeRange, float scrollLength)
|
||||||
|
=> (float)((time - START_TIME) / timeRange) * scrollLength;
|
||||||
|
|
||||||
|
public double TimeAt(float position, double currentTime, double timeRange, float scrollLength)
|
||||||
|
=> 0;
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
@ -10,15 +13,23 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
{
|
{
|
||||||
public class TestSceneHoldNote : ManiaHitObjectTestScene
|
public class TestSceneHoldNote : ManiaHitObjectTestScene
|
||||||
{
|
{
|
||||||
|
public TestSceneHoldNote()
|
||||||
|
{
|
||||||
|
AddToggleStep("toggle hitting", v =>
|
||||||
|
{
|
||||||
|
foreach (var holdNote in CreatedDrawables.SelectMany(d => d.ChildrenOfType<DrawableHoldNote>()))
|
||||||
|
{
|
||||||
|
((Bindable<bool>)holdNote.IsHitting).Value = v;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
protected override DrawableManiaHitObject CreateHitObject()
|
protected override DrawableManiaHitObject CreateHitObject()
|
||||||
{
|
{
|
||||||
var note = new HoldNote { Duration = 1000 };
|
var note = new HoldNote { Duration = 1000 };
|
||||||
note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
note.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||||
|
|
||||||
return new DrawableHoldNote(note)
|
return new DrawableHoldNote(note);
|
||||||
{
|
|
||||||
Height = 200,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
|||||||
if (!(sprite is TextureAnimation animation))
|
if (!(sprite is TextureAnimation animation))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
animation.GotoFrame(0);
|
||||||
animation.IsPlaying = isHitting.NewValue;
|
animation.IsPlaying = isHitting.NewValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.UI
|
namespace osu.Game.Rulesets.Mania.UI
|
||||||
{
|
{
|
||||||
@ -13,8 +12,6 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
Size = new Vector2(1, 0.8f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,30 +72,19 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new Box
|
||||||
{
|
{
|
||||||
Name = "Columns mask",
|
Name = "Background",
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black
|
||||||
|
},
|
||||||
|
columnFlow = new FillFlowContainer<Column>
|
||||||
|
{
|
||||||
|
Name = "Columns",
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
Masking = true,
|
Direction = FillDirection.Horizontal,
|
||||||
CornerRadius = 5,
|
Padding = new MarginPadding { Left = COLUMN_SPACING, Right = COLUMN_SPACING },
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
Name = "Background",
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.Black
|
|
||||||
},
|
|
||||||
columnFlow = new FillFlowContainer<Column>
|
|
||||||
{
|
|
||||||
Name = "Columns",
|
|
||||||
RelativeSizeAxes = Axes.Y,
|
|
||||||
AutoSizeAxes = Axes.X,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Padding = new MarginPadding { Left = COLUMN_SPACING, Right = COLUMN_SPACING },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
|
BIN
osu.Game.Rulesets.Osu.Tests/Resources/special-skin/sliderb0.png
Normal file
BIN
osu.Game.Rulesets.Osu.Tests/Resources/special-skin/sliderb0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -18,6 +18,8 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
public LegacySliderBall(Drawable animationContent)
|
public LegacySliderBall(Drawable animationContent)
|
||||||
{
|
{
|
||||||
this.animationContent = animationContent;
|
this.animationContent = animationContent;
|
||||||
|
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -62,17 +62,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
// Math.Max((150 / Velocity) * GameBase.SIXTY_FRAME_TIME, GameBase.SIXTY_FRAME_TIME);
|
// Math.Max((150 / Velocity) * GameBase.SIXTY_FRAME_TIME, GameBase.SIXTY_FRAME_TIME);
|
||||||
|
|
||||||
if (sliderBallContent != null)
|
if (sliderBallContent != null)
|
||||||
{
|
return new LegacySliderBall(sliderBallContent);
|
||||||
var size = sliderBallContent.Size;
|
|
||||||
|
|
||||||
sliderBallContent.RelativeSizeAxes = Axes.Both;
|
|
||||||
sliderBallContent.Size = Vector2.One;
|
|
||||||
|
|
||||||
return new LegacySliderBall(sliderBallContent)
|
|
||||||
{
|
|
||||||
Size = size
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -173,8 +173,27 @@ namespace osu.Game.Users
|
|||||||
public int Available;
|
public int Available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private UserStatistics statistics;
|
||||||
|
|
||||||
[JsonProperty(@"statistics")]
|
[JsonProperty(@"statistics")]
|
||||||
public UserStatistics Statistics;
|
public UserStatistics Statistics
|
||||||
|
{
|
||||||
|
get => statistics ??= new UserStatistics();
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (statistics != null)
|
||||||
|
// we may already have rank history populated
|
||||||
|
value.RankHistory = statistics.RankHistory;
|
||||||
|
|
||||||
|
statistics = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty(@"rankHistory")]
|
||||||
|
private RankHistoryData rankHistory
|
||||||
|
{
|
||||||
|
set => statistics.RankHistory = value;
|
||||||
|
}
|
||||||
|
|
||||||
public class RankHistoryData
|
public class RankHistoryData
|
||||||
{
|
{
|
||||||
@ -185,12 +204,6 @@ namespace osu.Game.Users
|
|||||||
public int[] Data;
|
public int[] Data;
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty(@"rankHistory")]
|
|
||||||
private RankHistoryData rankHistory
|
|
||||||
{
|
|
||||||
set => Statistics.RankHistory = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonProperty("badges")]
|
[JsonProperty("badges")]
|
||||||
public Badge[] Badges;
|
public Badge[] Badges;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<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.331.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.331.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2020.401.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2020.402.0" />
|
||||||
<PackageReference Include="Sentry" Version="2.1.1" />
|
<PackageReference Include="Sentry" Version="2.1.1" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.331.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.331.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.401.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.402.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. -->
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
@ -79,7 +79,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.Framework" Version="2020.401.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2020.402.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user