1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 01:19:52 +08:00

make code inspector happy

This commit is contained in:
Caiyi Shyu
2024-07-26 22:56:07 +08:00
Unverified
parent a3576a55c2
commit aed81d9758
2 changed files with 6 additions and 5 deletions
@@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Mods
public readonly BindableBool Expanded = new BindableBool();
protected new ModCustomisationPanel Parent => (ModCustomisationPanel)base.Parent;
protected new ModCustomisationPanel? Parent => (ModCustomisationPanel?)base.Parent;
public ModCustomisationHeader()
{
@@ -99,7 +99,7 @@ namespace osu.Game.Overlays.Mods
{
if (Enabled.Value)
{
Parent.UpdateHoverExpansion(true);
Parent?.UpdateHoverExpansion(true);
}
return base.OnHover(e);
@@ -179,7 +179,8 @@ namespace osu.Game.Overlays.Mods
expandedByHovering = false;
}
private bool expandedByHovering = false;
private bool expandedByHovering;
public void UpdateHoverExpansion(bool hovered)
{
if (hovered && !Expanded.Value)
@@ -223,11 +224,11 @@ namespace osu.Game.Overlays.Mods
public override bool RequestsFocus => Expanded.Value;
public override bool AcceptsFocus => Expanded.Value;
public new ModCustomisationPanel Parent => (ModCustomisationPanel)base.Parent;
public new ModCustomisationPanel? Parent => (ModCustomisationPanel?)base.Parent;
protected override void OnHoverLost(HoverLostEvent e)
{
Parent.UpdateHoverExpansion(false);
Parent?.UpdateHoverExpansion(false);
base.OnHoverLost(e);
}
}