1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Merge branch 'master' into fix-hr-cs-mania-adjustment

This commit is contained in:
Bartłomiej Dach 2023-10-13 16:08:54 +02:00 committed by GitHub
commit 8a4c2624bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View File

@ -46,10 +46,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
switch (osuComponent.Component)
{
case OsuSkinComponents.FollowPoint:
return this.GetAnimation("followpoint", true, true, true, startAtCurrentTime: false);
return this.GetAnimation("followpoint", true, true, true, startAtCurrentTime: false, maxSize: new Vector2(OsuHitObject.OBJECT_RADIUS * 2, OsuHitObject.OBJECT_RADIUS));
case OsuSkinComponents.SliderScorePoint:
return this.GetAnimation("sliderscorepoint", false, false);
return this.GetAnimation("sliderscorepoint", false, false, maxSize: OsuHitObject.OBJECT_DIMENSIONS);
case OsuSkinComponents.SliderFollowCircle:
var followCircleContent = this.GetAnimation("sliderfollowcircle", true, true, true, maxSize: MAX_FOLLOW_CIRCLE_AREA_SIZE);

View File

@ -11,6 +11,7 @@ using osu.Framework.Threading;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Localisation;
using osu.Game.Overlays;
using osu.Game.Overlays.Settings;
using osu.Game.Overlays.Settings.Sections.Input;
@ -157,7 +158,9 @@ namespace osu.Game.Tests.Visual.Settings
clickClearButton();
AddAssert("first binding cleared", () => string.IsNullOrEmpty(multiBindingRow.ChildrenOfType<KeyBindingRow.KeyButton>().First().Text.Text.ToString()));
AddAssert("first binding cleared",
() => multiBindingRow.ChildrenOfType<KeyBindingRow.KeyButton>().First().Text.Text,
() => Is.EqualTo(InputSettingsStrings.ActionHasNoKeyBinding));
AddStep("click second binding", () =>
{
@ -169,7 +172,9 @@ namespace osu.Game.Tests.Visual.Settings
clickClearButton();
AddAssert("second binding cleared", () => string.IsNullOrEmpty(multiBindingRow.ChildrenOfType<KeyBindingRow.KeyButton>().ElementAt(1).Text.Text.ToString()));
AddAssert("second binding cleared",
() => multiBindingRow.ChildrenOfType<KeyBindingRow.KeyButton>().ElementAt(1).Text.Text,
() => Is.EqualTo(InputSettingsStrings.ActionHasNoKeyBinding));
void clickClearButton()
{
@ -327,7 +332,7 @@ namespace osu.Game.Tests.Visual.Settings
KeyBindingConflictPopover popover = null;
AddUntilStep("wait for popover", () => popover = panel.ChildrenOfType<KeyBindingConflictPopover>().SingleOrDefault(), () => Is.Not.Null);
AddStep("click second button", () => popover.ChildrenOfType<RoundedButton>().ElementAt(1).TriggerClick());
checkBinding("Left (centre)", string.Empty);
checkBinding("Left (centre)", InputSettingsStrings.ActionHasNoKeyBinding.ToString());
checkBinding("Left (rim)", "M1");
}
@ -360,7 +365,7 @@ namespace osu.Game.Tests.Visual.Settings
AddUntilStep("wait for popover", () => popover = panel.ChildrenOfType<KeyBindingConflictPopover>().SingleOrDefault(), () => Is.Not.Null);
AddStep("click second button", () => popover.ChildrenOfType<RoundedButton>().ElementAt(1).TriggerClick());
checkBinding("Left (centre)", "M1");
checkBinding("Left (rim)", string.Empty);
checkBinding("Left (rim)", InputSettingsStrings.ActionHasNoKeyBinding.ToString());
}
[Test]