mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Merge remote-tracking branch 'origin/master' into optimise-diffcalc
This commit is contained in:
commit
e130204a3b
@ -37,6 +37,11 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
var osuObject = (OsuHitObject)drawable.HitObject;
|
||||
Vector2 origin = drawable.Position;
|
||||
|
||||
// Wiggle the repeat points with the slider instead of independently.
|
||||
// Also fixes an issue with repeat points being positioned incorrectly.
|
||||
if (osuObject is RepeatPoint)
|
||||
return;
|
||||
|
||||
Random objRand = new Random((int)osuObject.StartTime);
|
||||
|
||||
// Wiggle all objects during TimePreempt
|
||||
|
@ -45,10 +45,10 @@ namespace osu.Game.Rulesets.Osu
|
||||
|
||||
public enum OsuAction
|
||||
{
|
||||
[Description("Left Button")]
|
||||
[Description("Left button")]
|
||||
LeftButton,
|
||||
|
||||
[Description("Right Button")]
|
||||
[Description("Right button")]
|
||||
RightButton
|
||||
}
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ namespace osu.Game.Rulesets.Taiko
|
||||
|
||||
public enum TaikoAction
|
||||
{
|
||||
[Description("Left (Rim)")]
|
||||
[Description("Left (rim)")]
|
||||
LeftRim,
|
||||
[Description("Left (Centre)")]
|
||||
[Description("Left (centre)")]
|
||||
LeftCentre,
|
||||
[Description("Right (Centre)")]
|
||||
[Description("Right (centre)")]
|
||||
RightCentre,
|
||||
[Description("Right (Rim)")]
|
||||
[Description("Right (rim)")]
|
||||
RightRim
|
||||
}
|
||||
}
|
||||
|
@ -71,17 +71,17 @@ namespace osu.Game.Input.Bindings
|
||||
ToggleSettings,
|
||||
[Description("Toggle osu!direct")]
|
||||
ToggleDirect,
|
||||
[Description("Increase Volume")]
|
||||
[Description("Increase volume")]
|
||||
IncreaseVolume,
|
||||
[Description("Decrease Volume")]
|
||||
[Description("Decrease volume")]
|
||||
DecreaseVolume,
|
||||
[Description("Toggle mute")]
|
||||
ToggleMute,
|
||||
|
||||
// In-Game Keybindings
|
||||
[Description("Skip Cutscene")]
|
||||
[Description("Skip cutscene")]
|
||||
SkipCutscene,
|
||||
[Description("Quick Retry (Hold)")]
|
||||
[Description("Quick retry (hold)")]
|
||||
QuickRetry,
|
||||
|
||||
[Description("Take screenshot")]
|
||||
|
@ -291,7 +291,7 @@ namespace osu.Game.Overlays
|
||||
messageRequest?.Cancel();
|
||||
|
||||
ListChannelsRequest req = new ListChannelsRequest();
|
||||
req.Success += delegate (List<Channel> channels)
|
||||
req.Success += delegate(List<Channel> channels)
|
||||
{
|
||||
AvailableChannels = channels;
|
||||
|
||||
@ -323,10 +323,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
protected Channel CurrentChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
return currentChannel;
|
||||
}
|
||||
get { return currentChannel; }
|
||||
|
||||
set
|
||||
{
|
||||
@ -445,13 +442,7 @@ namespace osu.Game.Overlays
|
||||
if (updates?.Presence != null)
|
||||
{
|
||||
foreach (var channel in updates.Presence)
|
||||
{
|
||||
if (careChannels.Find(c => c.Id == channel.Id) == null)
|
||||
{
|
||||
channel.Joined.Value = true;
|
||||
addChannel(channel);
|
||||
}
|
||||
}
|
||||
addChannel(AvailableChannels.Find(c => c.Id == channel.Id));
|
||||
|
||||
foreach (var group in updates.Messages.GroupBy(m => m.ChannelId))
|
||||
careChannels.Find(c => c.Id == group.Key)?.AddNewMessages(group.ToArray());
|
||||
@ -462,10 +453,7 @@ namespace osu.Game.Overlays
|
||||
fetchReq = null;
|
||||
};
|
||||
|
||||
fetchReq.Failure += delegate
|
||||
{
|
||||
fetchReq = null;
|
||||
};
|
||||
fetchReq.Failure += delegate { fetchReq = null; };
|
||||
|
||||
api.Queue(fetchReq);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
new SettingsSlider<double, OffsetSlider>
|
||||
{
|
||||
LabelText = "Audio Offset",
|
||||
LabelText = "Audio offset",
|
||||
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset),
|
||||
KeyboardStep = 1f
|
||||
},
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume, KeyboardStep = 0.01f },
|
||||
new SettingsSlider<double> { LabelText = "Master (Window Inactive)", Bindable = config.GetBindable<double>(OsuSetting.VolumeInactive), KeyboardStep = 0.01f },
|
||||
new SettingsSlider<double> { LabelText = "Master (window inactive)", Bindable = config.GetBindable<double>(OsuSetting.VolumeInactive), KeyboardStep = 0.01f },
|
||||
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.01f },
|
||||
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack, KeyboardStep = 0.01f },
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Key Configuration",
|
||||
Text = "Key configuration",
|
||||
Action = keyConfig.ToggleVisibility
|
||||
},
|
||||
};
|
||||
|
@ -26,12 +26,12 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Raw Input",
|
||||
LabelText = "Raw input",
|
||||
Bindable = rawInputToggle
|
||||
},
|
||||
sensitivity = new SensitivitySetting
|
||||
{
|
||||
LabelText = "Cursor Sensitivity",
|
||||
LabelText = "Cursor sensitivity",
|
||||
Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
|
@ -105,6 +105,8 @@ namespace osu.Game.Overlays.Toolbar
|
||||
public override bool HandleNonPositionalInput => !ruleset.Disabled && base.HandleNonPositionalInput;
|
||||
public override bool HandlePositionalInput => !ruleset.Disabled && base.HandlePositionalInput;
|
||||
|
||||
public override bool PropagatePositionalInputSubTree => !ruleset.Disabled && base.PropagatePositionalInputSubTree;
|
||||
|
||||
private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);
|
||||
|
||||
protected override void Update()
|
||||
|
@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
/// <summary>
|
||||
/// Applies this <see cref="IApplicableToDrawableHitObjects"/> to a list of <see cref="DrawableHitObject"/>s.
|
||||
/// This will only be invoked with top-level <see cref="DrawableHitObject"/>s. Access <see cref="DrawableHitObject.NestedHitObjects"/> if adjusting nested objects is necessary.
|
||||
/// </summary>
|
||||
/// <param name="drawables">The list of <see cref="DrawableHitObject"/>s to apply to.</param>
|
||||
void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables);
|
||||
|
@ -145,7 +145,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
public event Action<DrawableHitObject, ArmedState> ApplyCustomUpdateState;
|
||||
|
||||
/// <summary>
|
||||
/// Plays all the hitsounds for this <see cref="DrawableHitObject"/>.
|
||||
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
|
||||
/// </summary>
|
||||
public void PlaySamples() => Samples?.Play();
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Lists;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -58,10 +56,10 @@ namespace osu.Game.Rulesets.Objects
|
||||
/// </summary>
|
||||
public HitWindows HitWindows { get; set; }
|
||||
|
||||
private readonly Lazy<SortedList<HitObject>> nestedHitObjects = new Lazy<SortedList<HitObject>>(() => new SortedList<HitObject>((h1, h2) => h1.StartTime.CompareTo(h2.StartTime)));
|
||||
private readonly SortedList<HitObject> nestedHitObjects = new SortedList<HitObject>(compareObjects);
|
||||
|
||||
[JsonIgnore]
|
||||
public IReadOnlyList<HitObject> NestedHitObjects => nestedHitObjects.Value;
|
||||
public IReadOnlyList<HitObject> NestedHitObjects => nestedHitObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Applies default values to this HitObject.
|
||||
@ -72,18 +70,14 @@ namespace osu.Game.Rulesets.Objects
|
||||
{
|
||||
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||
|
||||
if (nestedHitObjects.IsValueCreated)
|
||||
nestedHitObjects.Value.Clear();
|
||||
nestedHitObjects.Clear();
|
||||
|
||||
CreateNestedHitObjects();
|
||||
|
||||
if (nestedHitObjects.IsValueCreated)
|
||||
foreach (var h in nestedHitObjects)
|
||||
{
|
||||
nestedHitObjects.Value.ForEach(h =>
|
||||
{
|
||||
h.HitWindows = HitWindows;
|
||||
h.ApplyDefaults(controlPointInfo, difficulty);
|
||||
});
|
||||
h.HitWindows = HitWindows;
|
||||
h.ApplyDefaults(controlPointInfo, difficulty);
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +98,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
{
|
||||
}
|
||||
|
||||
protected void AddNested(HitObject hitObject) => nestedHitObjects.Value.Add(hitObject);
|
||||
protected void AddNested(HitObject hitObject) => nestedHitObjects.Add(hitObject);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the <see cref="Judgement"/> that represents the scoring information for this <see cref="HitObject"/>.
|
||||
@ -120,5 +114,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
/// </para>
|
||||
/// </summary>
|
||||
protected virtual HitWindows CreateHitWindows() => new HitWindows();
|
||||
|
||||
private static int compareObjects(HitObject first, HitObject second) => first.StartTime.CompareTo(second.StartTime);
|
||||
}
|
||||
}
|
||||
|
@ -6,19 +6,19 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
public enum ScrollingDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// Hitobjects will scroll vertically from the bottom of the hitobject container.
|
||||
/// Hit objects will scroll vertically from the bottom of the hitobject container.
|
||||
/// </summary>
|
||||
Up,
|
||||
/// <summary>
|
||||
/// Hitobjects will scroll vertically from the top of the hitobject container.
|
||||
/// Hit objects will scroll vertically from the top of the hitobject container.
|
||||
/// </summary>
|
||||
Down,
|
||||
/// <summary>
|
||||
/// Hitobjects will scroll horizontally from the right of the hitobject container.
|
||||
/// Hit objects will scroll horizontally from the right of the hitobject container.
|
||||
/// </summary>
|
||||
Left,
|
||||
/// <summary>
|
||||
/// Hitobjects will scroll horizontally from the left of the hitobject container.
|
||||
/// Hit objects will scroll horizontally from the left of the hitobject container.
|
||||
/// </summary>
|
||||
Right
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Edit.Components
|
||||
new OsuSpriteText
|
||||
{
|
||||
Origin = Anchor.BottomLeft,
|
||||
Text = "Playback Speed",
|
||||
Text = "Playback speed",
|
||||
RelativePositionAxes = Axes.Y,
|
||||
Y = 0.5f,
|
||||
Padding = new MarginPadding { Left = 45 }
|
||||
|
@ -59,8 +59,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
Spacing = new Vector2(0, 4),
|
||||
Children = new[]
|
||||
{
|
||||
hitObjectsCheckbox = new OsuCheckbox { LabelText = "Hitobjects" },
|
||||
hitSoundsCheckbox = new OsuCheckbox { LabelText = "Hitsounds" },
|
||||
hitObjectsCheckbox = new OsuCheckbox { LabelText = "Hit objects" },
|
||||
hitSoundsCheckbox = new OsuCheckbox { LabelText = "Hit sounds" },
|
||||
waveformCheckbox = new OsuCheckbox { LabelText = "Waveform" }
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
},
|
||||
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboards" },
|
||||
beatmapSkinsToggle = new PlayerCheckbox { LabelText = "Beatmap skins" },
|
||||
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
|
||||
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hit sounds" }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -327,11 +327,6 @@ namespace osu.Game.Screens.Select
|
||||
TextSize = 14,
|
||||
},
|
||||
},
|
||||
textFlow = new OsuTextFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -350,6 +345,8 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsPresent => base.IsPresent || textFlow == null; // Visibility is updated in the LoadComponentAsync callback
|
||||
|
||||
private void setTextAsync(string text)
|
||||
{
|
||||
LoadComponentAsync(new OsuTextFlowContainer(s => s.TextSize = 14)
|
||||
|
@ -21,8 +21,8 @@ namespace osu.Game.Screens.Select.Filter
|
||||
DateAdded,
|
||||
[Description("Difficulty")]
|
||||
Difficulty,
|
||||
[Description("Favorites")]
|
||||
Favorites,
|
||||
[Description("Favourites")]
|
||||
Favourites,
|
||||
[Description("Length")]
|
||||
Length,
|
||||
[Description("My Maps")]
|
||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, colours.Purple, null, Key.Number1);
|
||||
BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.fa_eraser, colours.Purple, null, Key.Number2);
|
||||
BeatmapOptions.AddButton(@"Edit", @"Beatmap", FontAwesome.fa_pencil, colours.Yellow, () =>
|
||||
BeatmapOptions.AddButton(@"Edit", @"beatmap", FontAwesome.fa_pencil, colours.Yellow, () =>
|
||||
{
|
||||
ValidForResume = false;
|
||||
Push(new Editor());
|
||||
|
@ -204,7 +204,7 @@ namespace osu.Game.Screens.Select
|
||||
Footer.AddButton(@"random", colours.Green, triggerRandom, Key.F2);
|
||||
Footer.AddButton(@"options", colours.Blue, BeatmapOptions, Key.F3);
|
||||
|
||||
BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo), Key.Number4, float.MaxValue);
|
||||
BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.fa_trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo), Key.Number4, float.MaxValue);
|
||||
}
|
||||
|
||||
if (this.beatmaps == null)
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Storyboards.Drawables
|
||||
{
|
||||
base.Update();
|
||||
|
||||
// TODO: this logic will need to be consolidated with other game samples like hitsounds.
|
||||
// TODO: this logic will need to be consolidated with other game samples like hit sounds.
|
||||
if (Time.Current < sample.Time)
|
||||
{
|
||||
// We've rewound before the start time of the sample
|
||||
|
Loading…
Reference in New Issue
Block a user