1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 15:27:24 +08:00

Merge branch 'master' into break-autogeneration

This commit is contained in:
Dean Herbert 2024-06-19 21:49:17 +09:00 committed by GitHub
commit 00443403b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
45 changed files with 60 additions and 99 deletions

View File

@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2024.528.1" /> <PackageReference Include="ppy.osu.Framework.Android" Version="2024.618.0" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged. <!-- Fody does not handle Android build well, and warns when unchanged.

View File

@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
{ {
base.LoadComplete(); base.LoadComplete();
inputManager = GetContainingInputManager(); inputManager = GetContainingInputManager()!;
BeginPlacement(); BeginPlacement();
} }

View File

@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Catch.UI
{ {
base.Update(); base.Update();
var replayState = (GetContainingInputManager().CurrentState as RulesetInputManagerInputState<CatchAction>)?.LastReplayState as CatchFramedReplayInputHandler.CatchReplayState; var replayState = (GetContainingInputManager()!.CurrentState as RulesetInputManagerInputState<CatchAction>)?.LastReplayState as CatchFramedReplayInputHandler.CatchReplayState;
SetCatcherPosition( SetCatcherPosition(
replayState?.CatcherX ?? replayState?.CatcherX ??

View File

@ -66,7 +66,7 @@ namespace osu.Game.Rulesets.Mania.Tests
AddStep("Hold key", () => AddStep("Hold key", () =>
{ {
clock.CurrentTime = 0; clock.CurrentTime = 0;
note.OnPressed(new KeyBindingPressEvent<ManiaAction>(GetContainingInputManager().CurrentState, ManiaAction.Key1)); note.OnPressed(new KeyBindingPressEvent<ManiaAction>(GetContainingInputManager()!.CurrentState, ManiaAction.Key1));
}); });
AddStep("progress time", () => clock.CurrentTime = 500); AddStep("progress time", () => clock.CurrentTime = 500);
AddAssert("head is visible", () => note.Head.Alpha == 1); AddAssert("head is visible", () => note.Head.Alpha == 1);

View File

@ -65,11 +65,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
if (tmp is IFramedAnimation tmpAnimation && tmpAnimation.FrameCount > 0) if (tmp is IFramedAnimation tmpAnimation && tmpAnimation.FrameCount > 0)
frameLength = Math.Max(1000 / 60.0, 170.0 / tmpAnimation.FrameCount); frameLength = Math.Max(1000 / 60.0, 170.0 / tmpAnimation.FrameCount);
light = skin.GetAnimation(lightImage, true, true, frameLength: frameLength).With(d => light = skin.GetAnimation(lightImage, true, true, frameLength: frameLength)?.With(d =>
{ {
if (d == null)
return;
d.Origin = Anchor.Centre; d.Origin = Anchor.Centre;
d.Blending = BlendingParameters.Additive; d.Blending = BlendingParameters.Additive;
d.Scale = new Vector2(lightScale); d.Scale = new Vector2(lightScale);
@ -91,11 +88,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
direction.BindTo(scrollingInfo.Direction); direction.BindTo(scrollingInfo.Direction);
isHitting.BindTo(holdNote.IsHitting); isHitting.BindTo(holdNote.IsHitting);
bodySprite = skin.GetAnimation(imageName, wrapMode, wrapMode, true, true, frameLength: 30).With(d => bodySprite = skin.GetAnimation(imageName, wrapMode, wrapMode, true, true, frameLength: 30)?.With(d =>
{ {
if (d == null)
return;
if (d is TextureAnimation animation) if (d is TextureAnimation animation)
animation.IsPlaying = false; animation.IsPlaying = false;

View File

@ -43,11 +43,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
if (tmp is IFramedAnimation tmpAnimation && tmpAnimation.FrameCount > 0) if (tmp is IFramedAnimation tmpAnimation && tmpAnimation.FrameCount > 0)
frameLength = Math.Max(1000 / 60.0, 170.0 / tmpAnimation.FrameCount); frameLength = Math.Max(1000 / 60.0, 170.0 / tmpAnimation.FrameCount);
explosion = skin.GetAnimation(imageName, true, false, frameLength: frameLength).With(d => explosion = skin.GetAnimation(imageName, true, false, frameLength: frameLength)?.With(d =>
{ {
if (d == null)
return;
d.Origin = Anchor.Centre; d.Origin = Anchor.Centre;
d.Blending = BlendingParameters.Additive; d.Blending = BlendingParameters.Additive;
d.Scale = new Vector2(explosionScale); d.Scale = new Vector2(explosionScale);

View File

@ -28,13 +28,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
string bottomImage = skin.GetManiaSkinConfig<string>(LegacyManiaSkinConfigurationLookups.BottomStageImage)?.Value string bottomImage = skin.GetManiaSkinConfig<string>(LegacyManiaSkinConfigurationLookups.BottomStageImage)?.Value
?? "mania-stage-bottom"; ?? "mania-stage-bottom";
sprite = skin.GetAnimation(bottomImage, true, true)?.With(d => sprite = skin.GetAnimation(bottomImage, true, true)?.With(d => d.Scale = new Vector2(1.6f));
{
if (d == null)
return;
d.Scale = new Vector2(1.6f);
});
if (sprite != null) if (sprite != null)
InternalChild = sprite; InternalChild = sprite;

View File

@ -161,9 +161,9 @@ namespace osu.Game.Rulesets.Osu.Tests
pressed = value; pressed = value;
if (value) if (value)
OnPressed(new KeyBindingPressEvent<OsuAction>(GetContainingInputManager().CurrentState, OsuAction.LeftButton)); OnPressed(new KeyBindingPressEvent<OsuAction>(GetContainingInputManager()!.CurrentState, OsuAction.LeftButton));
else else
OnReleased(new KeyBindingReleaseEvent<OsuAction>(GetContainingInputManager().CurrentState, OsuAction.LeftButton)); OnReleased(new KeyBindingReleaseEvent<OsuAction>(GetContainingInputManager()!.CurrentState, OsuAction.LeftButton));
} }
} }

View File

@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Osu.Tests
private void scheduleHit() => AddStep("schedule action", () => private void scheduleHit() => AddStep("schedule action", () =>
{ {
double delay = hitCircle.StartTime - hitCircle.HitWindows.WindowFor(HitResult.Great) - Time.Current; double delay = hitCircle.StartTime - hitCircle.HitWindows.WindowFor(HitResult.Great) - Time.Current;
Scheduler.AddDelayed(() => hitAreaReceptor.OnPressed(new KeyBindingPressEvent<OsuAction>(GetContainingInputManager().CurrentState, OsuAction.LeftButton)), delay); Scheduler.AddDelayed(() => hitAreaReceptor.OnPressed(new KeyBindingPressEvent<OsuAction>(GetContainingInputManager()!.CurrentState, OsuAction.LeftButton)), delay);
}); });
} }
} }

View File

@ -92,7 +92,7 @@ namespace osu.Game.Tests.Visual.Editing
{ {
base.LoadComplete(); base.LoadComplete();
updatePosition(GetContainingInputManager().CurrentState.Mouse.Position); updatePosition(GetContainingInputManager()!.CurrentState.Mouse.Position);
} }
protected override bool OnMouseMove(MouseMoveEvent e) protected override bool OnMouseMove(MouseMoveEvent e)

View File

@ -58,7 +58,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
editorInfo.Selected.ValueChanged += selection => editorInfo.Selected.ValueChanged += selection =>
{ {
// ensure any ongoing edits are committed out to the *current* selection before changing to a new one. // ensure any ongoing edits are committed out to the *current* selection before changing to a new one.
GetContainingFocusManager().TriggerFocusContention(null); GetContainingFocusManager()?.TriggerFocusContention(null);
// Required to avoid cyclic failure in BindableWithCurrent (TriggerChange called during the Current_Set process). // Required to avoid cyclic failure in BindableWithCurrent (TriggerChange called during the Current_Set process).
// Arguable a framework issue but since we haven't hit it anywhere else a local workaround seems best. // Arguable a framework issue but since we haven't hit it anywhere else a local workaround seems best.

View File

@ -1,10 +1,8 @@
// 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.Diagnostics;
using ManagedBass.Fx; using ManagedBass.Fx;
using osu.Framework.Audio.Mixing; using osu.Framework.Audio.Mixing;
using osu.Framework.Caching;
using osu.Framework.Graphics; using osu.Framework.Graphics;
namespace osu.Game.Audio.Effects namespace osu.Game.Audio.Effects
@ -26,8 +24,6 @@ namespace osu.Game.Audio.Effects
private readonly BQFParameters filter; private readonly BQFParameters filter;
private readonly BQFType type; private readonly BQFType type;
private readonly Cached filterApplication = new Cached();
private int cutoff; private int cutoff;
/// <summary> /// <summary>
@ -42,7 +38,7 @@ namespace osu.Game.Audio.Effects
return; return;
cutoff = value; cutoff = value;
filterApplication.Invalidate(); updateFilter();
} }
} }
@ -64,18 +60,9 @@ namespace osu.Game.Audio.Effects
fQ = 0.7f fQ = 0.7f
}; };
Cutoff = getInitialCutoff(type); cutoff = getInitialCutoff(type);
}
protected override void Update() updateFilter();
{
base.Update();
if (!filterApplication.IsValid)
{
updateFilter(cutoff);
filterApplication.Validate();
}
} }
private int getInitialCutoff(BQFType type) private int getInitialCutoff(BQFType type)
@ -93,13 +80,13 @@ namespace osu.Game.Audio.Effects
} }
} }
private void updateFilter(int newValue) private void updateFilter()
{ {
switch (type) switch (type)
{ {
case BQFType.LowPass: case BQFType.LowPass:
// Workaround for weird behaviour when rapidly setting fCenter of a low-pass filter to nyquist - 1hz. // Workaround for weird behaviour when rapidly setting fCenter of a low-pass filter to nyquist - 1hz.
if (newValue >= MAX_LOWPASS_CUTOFF) if (Cutoff >= MAX_LOWPASS_CUTOFF)
{ {
ensureDetached(); ensureDetached();
return; return;
@ -109,7 +96,7 @@ namespace osu.Game.Audio.Effects
// Workaround for weird behaviour when rapidly setting fCenter of a high-pass filter to 1hz. // Workaround for weird behaviour when rapidly setting fCenter of a high-pass filter to 1hz.
case BQFType.HighPass: case BQFType.HighPass:
if (newValue <= 1) if (Cutoff <= 1)
{ {
ensureDetached(); ensureDetached();
return; return;
@ -120,17 +107,8 @@ namespace osu.Game.Audio.Effects
ensureAttached(); ensureAttached();
int filterIndex = mixer.Effects.IndexOf(filter); filter.fCenter = Cutoff;
mixer.UpdateEffect(filter);
if (filterIndex < 0) return;
if (mixer.Effects[filterIndex] is BQFParameters existingFilter)
{
existingFilter.fCenter = newValue;
// required to update effect with new parameters.
mixer.Effects[filterIndex] = existingFilter;
}
} }
private void ensureAttached() private void ensureAttached()
@ -138,8 +116,7 @@ namespace osu.Game.Audio.Effects
if (IsAttached) if (IsAttached)
return; return;
Debug.Assert(!mixer.Effects.Contains(filter)); mixer.AddEffect(filter);
mixer.Effects.Add(filter);
IsAttached = true; IsAttached = true;
} }
@ -148,8 +125,7 @@ namespace osu.Game.Audio.Effects
if (!IsAttached) if (!IsAttached)
return; return;
Debug.Assert(mixer.Effects.Contains(filter)); mixer.RemoveEffect(filter);
mixer.Effects.Remove(filter);
IsAttached = false; IsAttached = false;
} }

View File

@ -53,7 +53,7 @@ namespace osu.Game.Graphics.Cursor
{ {
base.LoadComplete(); base.LoadComplete();
inputManager = GetContainingInputManager(); inputManager = GetContainingInputManager()!;
showDuringTouch = config.GetBindable<bool>(OsuSetting.GameplayCursorDuringTouch); showDuringTouch = config.GetBindable<bool>(OsuSetting.GameplayCursorDuringTouch);
} }

View File

@ -31,7 +31,7 @@ namespace osu.Game.Graphics.UserInterface
if (!allowImmediateFocus) if (!allowImmediateFocus)
return; return;
Scheduler.Add(() => GetContainingFocusManager().ChangeFocus(this)); Scheduler.Add(() => GetContainingFocusManager()!.ChangeFocus(this));
} }
public new void KillFocus() => base.KillFocus(); public new void KillFocus() => base.KillFocus();

View File

@ -59,7 +59,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
base.OnFocus(e); base.OnFocus(e);
GetContainingFocusManager().ChangeFocus(Component); GetContainingFocusManager()!.ChangeFocus(Component);
} }
protected override OsuTextBox CreateComponent() => CreateTextBox().With(t => protected override OsuTextBox CreateComponent() => CreateTextBox().With(t =>

View File

@ -85,7 +85,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
Current.BindValueChanged(updateTextBoxFromSlider, true); Current.BindValueChanged(updateTextBoxFromSlider, true);
} }
public bool TakeFocus() => GetContainingFocusManager().ChangeFocus(textBox); public bool TakeFocus() => GetContainingFocusManager()?.ChangeFocus(textBox) == true;
public bool SelectAll() => textBox.SelectAll(); public bool SelectAll() => textBox.SelectAll();

View File

@ -243,7 +243,7 @@ namespace osu.Game.Overlays.AccountCreation
if (nextTextBox != null) if (nextTextBox != null)
{ {
Schedule(() => GetContainingFocusManager().ChangeFocus(nextTextBox)); Schedule(() => GetContainingFocusManager()!.ChangeFocus(nextTextBox));
return true; return true;
} }

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Comments
base.LoadComplete(); base.LoadComplete();
if (!TextBox.ReadOnly) if (!TextBox.ReadOnly)
GetContainingFocusManager().ChangeFocus(TextBox); GetContainingFocusManager()!.ChangeFocus(TextBox);
} }
protected override void OnCommit(string text) protected override void OnCommit(string text)

View File

@ -150,7 +150,7 @@ namespace osu.Game.Overlays.Login
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
Schedule(() => { GetContainingFocusManager().ChangeFocus(string.IsNullOrEmpty(username.Text) ? username : password); }); Schedule(() => { GetContainingFocusManager()!.ChangeFocus(string.IsNullOrEmpty(username.Text) ? username : password); });
} }
} }
} }

View File

@ -216,7 +216,7 @@ namespace osu.Game.Overlays.Login
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
if (form != null) GetContainingFocusManager().ChangeFocus(form); if (form != null) GetContainingFocusManager()!.ChangeFocus(form);
base.OnFocus(e); base.OnFocus(e);
} }
} }

View File

@ -141,7 +141,7 @@ namespace osu.Game.Overlays.Login
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
Schedule(() => { GetContainingFocusManager().ChangeFocus(codeTextBox); }); Schedule(() => { GetContainingFocusManager()!.ChangeFocus(codeTextBox); });
} }
} }
} }

View File

@ -78,7 +78,7 @@ namespace osu.Game.Overlays
this.FadeIn(transition_time, Easing.OutQuint); this.FadeIn(transition_time, Easing.OutQuint);
FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out); FadeEdgeEffectTo(WaveContainer.SHADOW_OPACITY, WaveContainer.APPEAR_DURATION, Easing.Out);
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(panel)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(panel));
} }
protected override void PopOut() protected override void PopOut()

View File

@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Mods
{ {
base.LoadComplete(); base.LoadComplete();
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(nameTextBox)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(nameTextBox));
nameTextBox.Current.BindValueChanged(s => nameTextBox.Current.BindValueChanged(s =>
{ {

View File

@ -136,7 +136,7 @@ namespace osu.Game.Overlays.Mods
{ {
base.LoadComplete(); base.LoadComplete();
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(nameTextBox)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(nameTextBox));
} }
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e) public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)

View File

@ -949,7 +949,7 @@ namespace osu.Game.Overlays.Mods
RequestScroll?.Invoke(this); RequestScroll?.Invoke(this);
// Killing focus is done here because it's the only feasible place on ModSelectOverlay you can click on without triggering any action. // Killing focus is done here because it's the only feasible place on ModSelectOverlay you can click on without triggering any action.
Scheduler.Add(() => GetContainingFocusManager().ChangeFocus(null)); Scheduler.Add(() => GetContainingFocusManager()!.ChangeFocus(null));
return true; return true;
} }

View File

@ -465,7 +465,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
} }
if (HasFocus) if (HasFocus)
GetContainingFocusManager().ChangeFocus(null); GetContainingFocusManager()!.ChangeFocus(null);
cancelAndClearButtons.FadeOut(300, Easing.OutQuint); cancelAndClearButtons.FadeOut(300, Easing.OutQuint);
cancelAndClearButtons.BypassAutoSizeAxes |= Axes.Y; cancelAndClearButtons.BypassAutoSizeAxes |= Axes.Y;

View File

@ -106,7 +106,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{ {
var next = Children.SkipWhile(c => c != sender).Skip(1).FirstOrDefault(); var next = Children.SkipWhile(c => c != sender).Skip(1).FirstOrDefault();
if (next != null) if (next != null)
GetContainingFocusManager().ChangeFocus(next); GetContainingFocusManager()?.ChangeFocus(next);
} }
} }
} }

View File

@ -201,7 +201,7 @@ namespace osu.Game.Overlays
searchTextBox.HoldFocus = false; searchTextBox.HoldFocus = false;
if (searchTextBox.HasFocus) if (searchTextBox.HasFocus)
GetContainingFocusManager().ChangeFocus(null); GetContainingFocusManager()!.ChangeFocus(null);
} }
public override bool AcceptsFocus => true; public override bool AcceptsFocus => true;

View File

@ -669,7 +669,7 @@ namespace osu.Game.Overlays.SkinEditor
{ {
SpriteName = { Value = file.Name }, SpriteName = { Value = file.Name },
Origin = Anchor.Centre, Origin = Anchor.Centre,
Position = skinnableTarget.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position), Position = skinnableTarget.ToLocalSpace(GetContainingInputManager()!.CurrentState.Mouse.Position),
}; };
SelectedComponents.Clear(); SelectedComponents.Clear();

View File

@ -580,7 +580,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
{ {
base.LoadComplete(); base.LoadComplete();
GetContainingFocusManager().ChangeFocus(this); GetContainingFocusManager()!.ChangeFocus(this);
SelectAll(); SelectAll();
} }
} }

View File

@ -138,7 +138,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(sliderVelocitySlider)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(sliderVelocitySlider));
} }
} }
} }

View File

@ -45,7 +45,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
Child = new Box Child = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = colours.GreyCarmineLight, Colour = colours.PurpleLight,
Alpha = 0.4f, Alpha = 0.4f,
}, },
}, },
@ -212,12 +212,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
bool active = IsHovered || IsDragged; bool active = IsHovered || IsDragged;
var colour = colours.GreyCarmineLighter; var colour = colours.PurpleLighter;
if (active) if (active)
colour = colour.Lighten(0.3f); colour = colour.Lighten(0.3f);
this.FadeColour(colour, 400, Easing.OutQuint); this.FadeColour(colour, 400, Easing.OutQuint);
handle.ResizeWidthTo(active ? 20 : 10, 400, Easing.OutElastic); handle.ResizeWidthTo(active ? 20 : 10, 400, Easing.OutElasticHalf);
} }
} }
} }

View File

@ -45,7 +45,7 @@ namespace osu.Game.Screens.Edit.Setup
OnFocused?.Invoke(); OnFocused?.Invoke();
base.OnFocus(e); base.OnFocus(e);
GetContainingFocusManager().TriggerFocusContention(this); GetContainingFocusManager()!.TriggerFocusContention(this);
} }
} }
} }

View File

@ -70,7 +70,7 @@ namespace osu.Game.Screens.Edit.Setup
base.LoadComplete(); base.LoadComplete();
if (string.IsNullOrEmpty(ArtistTextBox.Current.Value)) if (string.IsNullOrEmpty(ArtistTextBox.Current.Value))
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(ArtistTextBox)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(ArtistTextBox));
ArtistTextBox.Current.BindValueChanged(artist => transferIfRomanised(artist.NewValue, RomanisedArtistTextBox)); ArtistTextBox.Current.BindValueChanged(artist => transferIfRomanised(artist.NewValue, RomanisedArtistTextBox));
TitleTextBox.Current.BindValueChanged(title => transferIfRomanised(title.NewValue, RomanisedTitleTextBox)); TitleTextBox.Current.BindValueChanged(title => transferIfRomanised(title.NewValue, RomanisedTitleTextBox));

View File

@ -126,7 +126,7 @@ namespace osu.Game.Screens.Edit.Timing
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
base.OnFocus(e); base.OnFocus(e);
GetContainingFocusManager().ChangeFocus(textBox); GetContainingFocusManager()!.ChangeFocus(textBox);
} }
private void updateState() private void updateState()

View File

@ -53,7 +53,7 @@ namespace osu.Game.Screens.Edit.Verify
if (issue.Time != null) if (issue.Time != null)
{ {
clock.Seek(issue.Time.Value); clock.Seek(issue.Time.Value);
editor.OnPressed(new KeyBindingPressEvent<GlobalAction>(GetContainingInputManager().CurrentState, GlobalAction.EditorComposeMode)); editor.OnPressed(new KeyBindingPressEvent<GlobalAction>(GetContainingInputManager()!.CurrentState, GlobalAction.EditorComposeMode));
} }
if (!issue.HitObjects.Any()) if (!issue.HitObjects.Any())

View File

@ -248,21 +248,21 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
{ {
base.LoadComplete(); base.LoadComplete();
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(passwordTextBox)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(passwordTextBox));
passwordTextBox.OnCommit += (_, _) => performJoin(); passwordTextBox.OnCommit += (_, _) => performJoin();
} }
private void performJoin() private void performJoin()
{ {
lounge?.Join(room, passwordTextBox.Text, null, joinFailed); lounge?.Join(room, passwordTextBox.Text, null, joinFailed);
GetContainingFocusManager().TriggerFocusContention(passwordTextBox); GetContainingFocusManager()?.TriggerFocusContention(passwordTextBox);
} }
private void joinFailed(string error) => Schedule(() => private void joinFailed(string error) => Schedule(() =>
{ {
passwordTextBox.Text = string.Empty; passwordTextBox.Text = string.Empty;
GetContainingFocusManager().ChangeFocus(passwordTextBox); GetContainingFocusManager()!.ChangeFocus(passwordTextBox);
errorText.Text = error; errorText.Text = error;
errorText errorText

View File

@ -249,7 +249,7 @@ namespace osu.Game.Screens.Play
{ {
base.LoadComplete(); base.LoadComplete();
inputManager = GetContainingInputManager(); inputManager = GetContainingInputManager()!;
showStoryboards.BindValueChanged(val => epilepsyWarning?.FadeTo(val.NewValue ? 1 : 0, 250, Easing.OutQuint), true); showStoryboards.BindValueChanged(val => epilepsyWarning?.FadeTo(val.NewValue ? 1 : 0, 250, Easing.OutQuint), true);
epilepsyWarning?.FinishTransforms(true); epilepsyWarning?.FinishTransforms(true);

View File

@ -1279,7 +1279,7 @@ namespace osu.Game.Screens.Select
{ {
// we need to block right click absolute scrolling when hovering a carousel item so context menus can display. // we need to block right click absolute scrolling when hovering a carousel item so context menus can display.
// this can be reconsidered when we have an alternative to right click scrolling. // this can be reconsidered when we have an alternative to right click scrolling.
if (GetContainingInputManager().HoveredDrawables.OfType<DrawableCarouselItem>().Any()) if (GetContainingInputManager()!.HoveredDrawables.OfType<DrawableCarouselItem>().Any())
{ {
rightMouseScrollBlocked = true; rightMouseScrollBlocked = true;
return false; return false;

View File

@ -245,7 +245,7 @@ namespace osu.Game.Screens.Select
searchTextBox.ReadOnly = true; searchTextBox.ReadOnly = true;
searchTextBox.HoldFocus = false; searchTextBox.HoldFocus = false;
if (searchTextBox.HasFocus) if (searchTextBox.HasFocus)
GetContainingFocusManager().ChangeFocus(searchTextBox); GetContainingFocusManager()!.ChangeFocus(searchTextBox);
} }
public void Activate() public void Activate()

View File

@ -95,7 +95,7 @@ namespace osu.Game.Screens.Select
modsAtGameplayStart = Mods.Value; modsAtGameplayStart = Mods.Value;
// Ctrl+Enter should start map with autoplay enabled. // Ctrl+Enter should start map with autoplay enabled.
if (GetContainingInputManager().CurrentState?.Keyboard.ControlPressed == true) if (GetContainingInputManager()?.CurrentState?.Keyboard.ControlPressed == true)
{ {
var autoInstance = getAutoplayMod(); var autoInstance = getAutoplayMod();

View File

@ -81,7 +81,7 @@ namespace osu.Game.Screens.SelectV2.Footer
{ {
base.LoadComplete(); base.LoadComplete();
ScheduleAfterChildren(() => GetContainingFocusManager().ChangeFocus(this)); ScheduleAfterChildren(() => GetContainingFocusManager()!.ChangeFocus(this));
beatmap.BindValueChanged(_ => Hide()); beatmap.BindValueChanged(_ => Hide());
} }

View File

@ -38,7 +38,7 @@ namespace osu.Game.Screens.Utility.SampleComponents
{ {
base.LoadComplete(); base.LoadComplete();
inputManager = GetContainingInputManager(); inputManager = GetContainingInputManager()!;
IsActive.BindTo(latencyArea.IsActiveArea); IsActive.BindTo(latencyArea.IsActiveArea);
} }

View File

@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Realm" Version="11.5.0" /> <PackageReference Include="Realm" Version="11.5.0" />
<PackageReference Include="ppy.osu.Framework" Version="2024.528.1" /> <PackageReference Include="ppy.osu.Framework" Version="2024.618.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.517.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2024.517.0" />
<PackageReference Include="Sentry" Version="4.3.0" /> <PackageReference Include="Sentry" Version="4.3.0" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. --> <!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->

View File

@ -23,6 +23,6 @@
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier> <RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2024.528.1" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2024.618.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>