Fix mod select overlay dimming itself

This commit is contained in:
Dean Herbert 2019-03-02 14:48:05 +09:00
parent c5011de774
commit b7126b3efb
2 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,12 @@ public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrack
protected override bool BlockNonPositionalInput => true;
/// <summary>
/// Temporary to allow for overlays in the main screen content to not dim theirselves.
/// Should be eventually replaced by dimming which is aware of the target dim container (traverse parent for certain interface type?).
/// </summary>
protected virtual bool DimMainContent => true;
[Resolved(CanBeNull = true)]
private OsuGame osuGame { get; set; }
@ -95,7 +101,7 @@ private void onStateChanged(Visibility visibility)
if (OverlayActivationMode.Value != OverlayActivation.Disabled)
{
if (PlaySamplesOnStateChange) samplePopIn?.Play();
if (BlockScreenWideMouse) osuGame?.AddBlockingOverlay(this);
if (BlockScreenWideMouse && DimMainContent) osuGame?.AddBlockingOverlay(this);
}
else
State = Visibility.Hidden;

View File

@ -38,6 +38,8 @@ public class ModSelectOverlay : WaveOverlayContainer
protected override bool BlockNonPositionalInput => false;
protected override bool DimMainContent => false;
protected readonly FillFlowContainer<ModSection> ModSectionsContainer;
protected readonly Bindable<IEnumerable<Mod>> SelectedMods = new Bindable<IEnumerable<Mod>>(new Mod[] { });