mirror of
https://github.com/ppy/osu
synced 2025-01-23 14:22:51 +00:00
Invert logic to match existing toggles
This commit is contained in:
parent
c517b73375
commit
4f53185d43
@ -15,8 +15,6 @@ namespace osu.Game.Configuration
|
||||
// UI/selection defaults
|
||||
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
||||
Set(OsuSetting.Skin, 0, 0, int.MaxValue);
|
||||
Set(OsuSetting.IgnoreBeatmapSkin, false);
|
||||
Set(OsuSetting.IgnoreBeatmapHitsounds, false);
|
||||
|
||||
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
||||
|
||||
@ -62,6 +60,9 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.ShowFpsDisplay, false);
|
||||
|
||||
Set(OsuSetting.ShowStoryboard, true);
|
||||
Set(OsuSetting.BeatmapSkins, true);
|
||||
Set(OsuSetting.BeatmapHitsounds, true);
|
||||
|
||||
Set(OsuSetting.CursorRotation, true);
|
||||
|
||||
Set(OsuSetting.MenuParallax, true);
|
||||
@ -136,7 +137,7 @@ namespace osu.Game.Configuration
|
||||
ScreenshotFormat,
|
||||
ScreenshotCaptureMenuCursor,
|
||||
SongSelectRightMouseScroll,
|
||||
IgnoreBeatmapSkin,
|
||||
IgnoreBeatmapHitsounds
|
||||
BeatmapSkins,
|
||||
BeatmapHitsounds
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
private readonly PlayerSliderBar<double> dimSliderBar;
|
||||
private readonly PlayerSliderBar<double> blurSliderBar;
|
||||
private readonly PlayerCheckbox showStoryboardToggle;
|
||||
private readonly PlayerCheckbox ignoreBeatmapSkinToggle;
|
||||
private readonly PlayerCheckbox ignoreBeatmapHitsoundsToggle;
|
||||
private readonly PlayerCheckbox beatmapSkinsToggle;
|
||||
private readonly PlayerCheckbox beatmapHitsoundsToggle;
|
||||
|
||||
public VisualSettings()
|
||||
{
|
||||
@ -37,8 +37,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
Text = "Toggles:"
|
||||
},
|
||||
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboards" },
|
||||
ignoreBeatmapSkinToggle = new PlayerCheckbox { LabelText = "Ignore beatmap skin" },
|
||||
ignoreBeatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Ignore beatmap hitsounds" }
|
||||
beatmapSkinsToggle = new PlayerCheckbox { LabelText = "Beatmap skins" },
|
||||
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
|
||||
};
|
||||
}
|
||||
|
||||
@ -48,8 +48,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
dimSliderBar.Bindable = config.GetBindable<double>(OsuSetting.DimLevel);
|
||||
blurSliderBar.Bindable = config.GetBindable<double>(OsuSetting.BlurLevel);
|
||||
showStoryboardToggle.Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
ignoreBeatmapSkinToggle.Bindable = config.GetBindable<bool>(OsuSetting.IgnoreBeatmapSkin);
|
||||
ignoreBeatmapHitsoundsToggle.Bindable = config.GetBindable<bool>(OsuSetting.IgnoreBeatmapHitsounds);
|
||||
beatmapSkinsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||
beatmapHitsoundsToggle.Bindable = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,13 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
public event Action SourceChanged;
|
||||
|
||||
private Bindable<bool> beatmapSkins = new Bindable<bool>();
|
||||
private Bindable<bool> beatmapHitsounds = new Bindable<bool>();
|
||||
|
||||
public Drawable GetDrawableComponent(string componentName)
|
||||
{
|
||||
Drawable sourceDrawable;
|
||||
if (!ignoreBeatmapSkin && (sourceDrawable = source.GetDrawableComponent(componentName)) != null)
|
||||
if (beatmapSkins && (sourceDrawable = source.GetDrawableComponent(componentName)) != null)
|
||||
return sourceDrawable;
|
||||
return fallbackSource?.GetDrawableComponent(componentName);
|
||||
}
|
||||
@ -27,7 +30,7 @@ namespace osu.Game.Skinning
|
||||
public Texture GetTexture(string componentName)
|
||||
{
|
||||
Texture sourceTexture;
|
||||
if (!ignoreBeatmapSkin && (sourceTexture = source.GetTexture(componentName)) != null)
|
||||
if (beatmapSkins && (sourceTexture = source.GetTexture(componentName)) != null)
|
||||
return sourceTexture;
|
||||
return fallbackSource.GetTexture(componentName);
|
||||
}
|
||||
@ -35,7 +38,7 @@ namespace osu.Game.Skinning
|
||||
public SampleChannel GetSample(string sampleName)
|
||||
{
|
||||
SampleChannel sourceChannel;
|
||||
if (!ignoreBeatmapHitsounds && (sourceChannel = source.GetSample(sampleName)) != null)
|
||||
if (beatmapHitsounds && (sourceChannel = source.GetSample(sampleName)) != null)
|
||||
return sourceChannel;
|
||||
return fallbackSource?.GetSample(sampleName);
|
||||
}
|
||||
@ -80,19 +83,16 @@ namespace osu.Game.Skinning
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
private Bindable<bool> ignoreBeatmapSkin = new Bindable<bool>();
|
||||
private Bindable<bool> ignoreBeatmapHitsounds = new Bindable<bool>();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
ignoreBeatmapSkin = config.GetBindable<bool>(OsuSetting.IgnoreBeatmapSkin);
|
||||
ignoreBeatmapSkin.ValueChanged += val => onSourceChanged();
|
||||
ignoreBeatmapSkin.TriggerChange();
|
||||
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||
beatmapSkins.ValueChanged += val => onSourceChanged();
|
||||
beatmapSkins.TriggerChange();
|
||||
|
||||
ignoreBeatmapHitsounds = config.GetBindable<bool>(OsuSetting.IgnoreBeatmapHitsounds);
|
||||
ignoreBeatmapHitsounds.ValueChanged += val => onSourceChanged();
|
||||
ignoreBeatmapHitsounds.TriggerChange();
|
||||
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||
beatmapHitsounds.ValueChanged += val => onSourceChanged();
|
||||
beatmapHitsounds.TriggerChange();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user