mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Remove setting.
This commit is contained in:
parent
74a8a4bca8
commit
589d4eeb52
@ -3,7 +3,6 @@
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
@ -16,21 +15,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivation()
|
||||
{
|
||||
AddStep("disable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, true));
|
||||
AddAssert("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivationDisabled()
|
||||
{
|
||||
AddStep("enable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, false));
|
||||
AddAssert("activation mode is user triggered", () => Player.OverlayActivationMode == OverlayActivation.UserTriggered);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivationPaused()
|
||||
{
|
||||
AddStep("disable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, true));
|
||||
AddUntilStep("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
AddStep("pause gameplay", () => Player.Pause());
|
||||
AddUntilStep("activation mode is user triggered", () => Player.OverlayActivationMode == OverlayActivation.UserTriggered);
|
||||
@ -39,7 +29,6 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivationReplayLoaded()
|
||||
{
|
||||
AddStep("disable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, true));
|
||||
AddAssert("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
AddStep("load a replay", () => Player.DrawableRuleset.HasReplayLoaded.Value = true);
|
||||
AddAssert("activation mode is user triggered", () => Player.OverlayActivationMode == OverlayActivation.UserTriggered);
|
||||
@ -48,7 +37,6 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestGameplayOverlayActivationBreaks()
|
||||
{
|
||||
AddStep("disable overlay activation during gameplay", () => LocalConfig.Set(OsuSetting.GameplayDisableOverlayActivation, true));
|
||||
AddAssert("activation mode is disabled", () => Player.OverlayActivationMode == OverlayActivation.Disabled);
|
||||
AddStep("seek to break", () => Player.GameplayClockContainer.Seek(Beatmap.Value.Beatmap.Breaks.First().StartTime));
|
||||
AddUntilStep("activation mode is user triggered", () => Player.OverlayActivationMode == OverlayActivation.UserTriggered);
|
||||
|
@ -100,7 +100,6 @@ namespace osu.Game.Configuration
|
||||
|
||||
Set(OsuSetting.IncreaseFirstObjectVisibility, true);
|
||||
Set(OsuSetting.GameplayDisableWinKey, true);
|
||||
Set(OsuSetting.GameplayDisableOverlayActivation, true);
|
||||
|
||||
// Update
|
||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||
@ -233,6 +232,5 @@ namespace osu.Game.Configuration
|
||||
HitLighting,
|
||||
MenuBackgroundSource,
|
||||
GameplayDisableWinKey,
|
||||
GameplayDisableOverlayActivation
|
||||
}
|
||||
}
|
||||
|
@ -77,11 +77,6 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
LabelText = "Score display mode",
|
||||
Bindable = config.GetBindable<ScoringMode>(OsuSetting.ScoreDisplayMode)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Disable overlays during gameplay",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.GameplayDisableOverlayActivation)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -69,8 +69,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private Bindable<bool> mouseWheelDisabled;
|
||||
|
||||
private Bindable<bool> gameplayOverlaysDisabled;
|
||||
|
||||
private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>();
|
||||
|
||||
public int RestartCount;
|
||||
@ -176,7 +174,6 @@ namespace osu.Game.Screens.Play
|
||||
sampleRestart = audio.Samples.Get(@"Gameplay/restart");
|
||||
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||
gameplayOverlaysDisabled = config.GetBindable<bool>(OsuSetting.GameplayDisableOverlayActivation);
|
||||
|
||||
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);
|
||||
|
||||
@ -212,6 +209,10 @@ namespace osu.Game.Screens.Play
|
||||
if (game != null)
|
||||
OverlayActivationMode.BindTo(game.OverlayActivationMode);
|
||||
|
||||
DrawableRuleset.IsPaused.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
breakTracker.IsBreakTime.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||
|
||||
// bind clock into components that require it
|
||||
@ -358,7 +359,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void updateOverlayActivationMode()
|
||||
{
|
||||
bool canTriggerOverlays = DrawableRuleset.IsPaused.Value || breakTracker.IsBreakTime.Value || !gameplayOverlaysDisabled.Value;
|
||||
bool canTriggerOverlays = DrawableRuleset.IsPaused.Value || breakTracker.IsBreakTime.Value;
|
||||
|
||||
if (DrawableRuleset.HasReplayLoaded.Value || canTriggerOverlays)
|
||||
OverlayActivationMode.Value = OverlayActivation.UserTriggered;
|
||||
@ -653,10 +654,7 @@ namespace osu.Game.Screens.Play
|
||||
foreach (var mod in Mods.Value.OfType<IApplicableToHUD>())
|
||||
mod.ApplyToHUD(HUDOverlay);
|
||||
|
||||
DrawableRuleset.IsPaused.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
breakTracker.IsBreakTime.BindValueChanged(_ => updateOverlayActivationMode());
|
||||
gameplayOverlaysDisabled.BindValueChanged(_ => updateOverlayActivationMode(), true);
|
||||
updateOverlayActivationMode();
|
||||
}
|
||||
|
||||
public override void OnSuspending(IScreen next)
|
||||
|
Loading…
Reference in New Issue
Block a user