mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge remote-tracking branch 'origin/master' into more-diffcalc-improvements
This commit is contained in:
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Difficulty;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Configuration.Tracking;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Select;
|
||||
@ -95,6 +96,11 @@ namespace osu.Game.Configuration
|
||||
public OsuConfigManager(Storage storage) : base(storage)
|
||||
{
|
||||
}
|
||||
|
||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||
{
|
||||
new TrackedSetting<bool>(OsuSetting.MouseDisableButtons, v => new SettingDescription(!v, "gameplay mouse buttons", v ? "disabled" : "enabled"))
|
||||
};
|
||||
}
|
||||
|
||||
public enum OsuSetting
|
||||
|
@ -26,7 +26,8 @@ namespace osu.Game.Input.Bindings
|
||||
{
|
||||
new KeyBinding(InputKey.F8, GlobalAction.ToggleChat),
|
||||
new KeyBinding(InputKey.F9, GlobalAction.ToggleSocial),
|
||||
new KeyBinding(InputKey.F12,GlobalAction.TakeScreenshot),
|
||||
new KeyBinding(InputKey.F10, GlobalAction.ToggleGameplayMouseButtons),
|
||||
new KeyBinding(InputKey.F12, GlobalAction.TakeScreenshot),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Alt, InputKey.R }, GlobalAction.ResetInputSettings),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.T }, GlobalAction.ToggleToolbar),
|
||||
@ -76,6 +77,8 @@ namespace osu.Game.Input.Bindings
|
||||
QuickRetry,
|
||||
|
||||
[Description("Take screenshot")]
|
||||
TakeScreenshot
|
||||
TakeScreenshot,
|
||||
[Description("Toggle gameplay mouse buttons")]
|
||||
ToggleGameplayMouseButtons,
|
||||
}
|
||||
}
|
||||
|
@ -466,6 +466,9 @@ namespace osu.Game
|
||||
case GlobalAction.ToggleDirect:
|
||||
direct.ToggleVisibility();
|
||||
return true;
|
||||
case GlobalAction.ToggleGameplayMouseButtons:
|
||||
LocalConfig.Set(OsuSetting.MouseDisableButtons, !LocalConfig.Get<bool>(OsuSetting.MouseDisableButtons));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -14,6 +14,7 @@ using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
@ -30,6 +31,7 @@ namespace osu.Game.Overlays
|
||||
private readonly SpriteText textLine3;
|
||||
|
||||
private const float height = 110;
|
||||
private const float height_notext = 98;
|
||||
private const float height_contracted = height * 0.9f;
|
||||
|
||||
private readonly FillFlowContainer<OptionLight> optionLights;
|
||||
@ -101,12 +103,12 @@ namespace osu.Game.Overlays
|
||||
},
|
||||
textLine3 = new OsuSpriteText
|
||||
{
|
||||
Padding = new MarginPadding { Bottom = 15 },
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Margin = new MarginPadding { Bottom = 15 },
|
||||
Font = @"Exo2.0-Bold",
|
||||
TextSize = 12,
|
||||
Alpha = 0.3f,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -116,9 +118,10 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager frameworkConfig)
|
||||
private void load(FrameworkConfigManager frameworkConfig, OsuConfigManager osuConfig)
|
||||
{
|
||||
BeginTracking(this, frameworkConfig);
|
||||
BeginTracking(this, osuConfig);
|
||||
}
|
||||
|
||||
private readonly Dictionary<(object, IConfigManager), TrackedSettings> trackedConfigManagers = new Dictionary<(object, IConfigManager), TrackedSettings>();
|
||||
@ -175,13 +178,10 @@ namespace osu.Game.Overlays
|
||||
textLine2.Text = description.Value;
|
||||
textLine3.Text = description.Shortcut.ToUpper();
|
||||
|
||||
box.Animate(
|
||||
b => b.FadeIn(500, Easing.OutQuint),
|
||||
b => b.ResizeHeightTo(height, 500, Easing.OutQuint)
|
||||
).Then(
|
||||
b => b.FadeOutFromOne(1500, Easing.InQuint),
|
||||
b => b.ResizeHeightTo(height_contracted, 1500, Easing.InQuint)
|
||||
);
|
||||
if (string.IsNullOrEmpty(textLine3.Text))
|
||||
textLine3.Text = "NO KEY BOUND";
|
||||
|
||||
Display(box);
|
||||
|
||||
int optionCount = 0;
|
||||
int selectedOption = -1;
|
||||
@ -213,6 +213,17 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
}
|
||||
|
||||
protected virtual void Display(Drawable toDisplay)
|
||||
{
|
||||
toDisplay.Animate(
|
||||
b => b.FadeIn(500, Easing.OutQuint),
|
||||
b => b.ResizeHeightTo(height, 500, Easing.OutQuint)
|
||||
).Then(
|
||||
b => b.FadeOutFromOne(1500, Easing.InQuint),
|
||||
b => b.ResizeHeightTo(height_contracted, 1500, Easing.InQuint)
|
||||
);
|
||||
}
|
||||
|
||||
private class OptionLight : Container
|
||||
{
|
||||
private Color4 glowingColour, idleColour;
|
||||
|
@ -2,12 +2,13 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Framework.Timing;
|
||||
using System.Linq;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Beatmaps
|
||||
namespace osu.Game.Rulesets.Difficulty
|
||||
{
|
||||
public abstract class DifficultyCalculator
|
||||
{
|
@ -7,8 +7,9 @@ using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Scoring
|
||||
namespace osu.Game.Rulesets.Difficulty
|
||||
{
|
||||
public abstract class PerformanceCalculator
|
||||
{
|
@ -99,11 +99,9 @@ namespace osu.Game.Rulesets.Objects
|
||||
cumulativeLength.Add(l);
|
||||
}
|
||||
|
||||
//TODO: Figure out if the following code is needed in some cases. Judging by the map
|
||||
// "Transform" http://osu.ppy.sh/s/484689 it seems like we should _not_ be doing this.
|
||||
// Lengthen slider curves that are too short compared to what's
|
||||
// in the .osu file.
|
||||
/*if (l < Length && calculatedPath.Count > 1)
|
||||
if (l < Distance && calculatedPath.Count > 1)
|
||||
{
|
||||
Vector2 diff = calculatedPath[calculatedPath.Count - 1] - calculatedPath[calculatedPath.Count - 2];
|
||||
double d = diff.Length;
|
||||
@ -111,9 +109,9 @@ namespace osu.Game.Rulesets.Objects
|
||||
if (d <= 0)
|
||||
return;
|
||||
|
||||
calculatedPath[calculatedPath.Count - 1] += diff * (float)((Length - l) / d);
|
||||
cumulativeLength[calculatedPath.Count - 1] = Length;
|
||||
}*/
|
||||
calculatedPath[calculatedPath.Count - 1] += diff * (float)((Distance - l) / d);
|
||||
cumulativeLength[calculatedPath.Count - 1] = Distance;
|
||||
}
|
||||
}
|
||||
|
||||
public void Calculate()
|
||||
|
@ -15,6 +15,7 @@ using osu.Game.Rulesets.Replays.Types;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
using osu.Game.Rulesets.Difficulty;
|
||||
|
||||
namespace osu.Game.Rulesets
|
||||
{
|
||||
|
Reference in New Issue
Block a user