mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
Merge branch 'master' into generic-error-sfx
This commit is contained in:
commit
67a8a51ec7
@ -1,6 +1,7 @@
|
||||
// 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.
|
||||
|
||||
using System;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||
@ -16,5 +17,13 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
var catchProcessor = (CatchBeatmapProcessor)beatmapProcessor;
|
||||
catchProcessor.HardRockOffsets = true;
|
||||
}
|
||||
|
||||
public override void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
||||
{
|
||||
base.ApplyToDifficulty(difficulty);
|
||||
|
||||
difficulty.CircleSize = Math.Min(difficulty.CircleSize * 1.3f, 10.0f); // CS uses a custom 1.3 ratio.
|
||||
difficulty.ApproachRate = Math.Min(difficulty.ApproachRate * ADJUST_RATIO, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
@ -22,5 +23,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
OsuHitObjectGenerationUtils.ReflectVerticallyAlongPlayfield(osuObject);
|
||||
}
|
||||
|
||||
public override void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
||||
{
|
||||
base.ApplyToDifficulty(difficulty);
|
||||
|
||||
difficulty.CircleSize = Math.Min(difficulty.CircleSize * 1.3f, 10.0f); // CS uses a custom 1.3 ratio.
|
||||
difficulty.ApproachRate = Math.Min(difficulty.ApproachRate * ADJUST_RATIO, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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]
|
||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
new TourneyButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
BackgroundColour = colours.Pink3,
|
||||
BackgroundColour = colours.DangerousButtonColour,
|
||||
Text = "Clear all",
|
||||
Action = () =>
|
||||
{
|
||||
|
@ -397,5 +397,7 @@ namespace osu.Game.Graphics
|
||||
|
||||
public Color4 SpotlightColour => Green2;
|
||||
public Color4 FeaturedArtistColour => Blue2;
|
||||
|
||||
public Color4 DangerousButtonColour => Pink3;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
BackgroundColour = colours.PinkDark;
|
||||
BackgroundColour = colours.DangerousButtonColour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Overlays.FirstRunSetup
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
BackgroundColour = colours.Pink3,
|
||||
BackgroundColour = colours.DangerousButtonColour,
|
||||
Text = FirstRunSetupOverlayStrings.ClassicDefaults,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Action = applyClassic
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Settings
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
BackgroundColour = colours.Pink3;
|
||||
BackgroundColour = colours.DangerousButtonColour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
applyNewButton = new HoverableRoundedButton
|
||||
{
|
||||
Text = InputSettingsStrings.ApplyNewBinding,
|
||||
BackgroundColour = colours.Pink3,
|
||||
BackgroundColour = colours.DangerousButtonColour,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Width = 0.48f,
|
||||
Anchor = Anchor.CentreRight,
|
||||
|
@ -12,11 +12,13 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Localisation;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
@ -153,7 +155,20 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
Scheduler.AddOnce(updateText);
|
||||
|
||||
void updateText() => Text.Text = keyCombinationProvider.GetReadableString(KeyBinding.Value.KeyCombination);
|
||||
void updateText()
|
||||
{
|
||||
LocalisableString keyCombinationString = keyCombinationProvider.GetReadableString(KeyBinding.Value.KeyCombination);
|
||||
float alpha = 1;
|
||||
|
||||
if (LocalisableString.IsNullOrEmpty(keyCombinationString))
|
||||
{
|
||||
keyCombinationString = InputSettingsStrings.ActionHasNoKeyBinding;
|
||||
alpha = 0.4f;
|
||||
}
|
||||
|
||||
Text.Text = keyCombinationString;
|
||||
Text.Alpha = alpha;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
@ -18,17 +18,16 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override LocalisableString Description => "Everything just got a bit harder...";
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
||||
|
||||
protected const float ADJUST_RATIO = 1.4f;
|
||||
|
||||
public void ReadFromDifficulty(IBeatmapDifficultyInfo difficulty)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
||||
{
|
||||
const float ratio = 1.4f;
|
||||
difficulty.CircleSize = Math.Min(difficulty.CircleSize * 1.3f, 10.0f); // CS uses a custom 1.3 ratio.
|
||||
difficulty.ApproachRate = Math.Min(difficulty.ApproachRate * ratio, 10.0f);
|
||||
difficulty.DrainRate = Math.Min(difficulty.DrainRate * ratio, 10.0f);
|
||||
difficulty.OverallDifficulty = Math.Min(difficulty.OverallDifficulty * ratio, 10.0f);
|
||||
difficulty.DrainRate = Math.Min(difficulty.DrainRate * ADJUST_RATIO, 10.0f);
|
||||
difficulty.OverallDifficulty = Math.Min(difficulty.OverallDifficulty * ADJUST_RATIO, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user