Merge pull request #18228 from bdach/mod-overlay/rename-more

Rename remaining references to "mod select screen" nomenclature
This commit is contained in:
Salman Ahmed 2022-05-11 20:21:41 +03:00 committed by GitHub
commit d4122f17a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -17,7 +17,7 @@ using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer namespace osu.Game.Tests.Visual.Multiplayer
{ {
public class TestSceneFreeModSelectScreen : MultiplayerTestScene public class TestSceneFreeModSelectOverlay : MultiplayerTestScene
{ {
private FreeModSelectOverlay freeModSelectOverlay; private FreeModSelectOverlay freeModSelectOverlay;
private readonly Bindable<Dictionary<ModType, IReadOnlyList<Mod>>> availableMods = new Bindable<Dictionary<ModType, IReadOnlyList<Mod>>>(); private readonly Bindable<Dictionary<ModType, IReadOnlyList<Mod>>> availableMods = new Bindable<Dictionary<ModType, IReadOnlyList<Mod>>>();

View File

@ -24,7 +24,7 @@ using osuTK.Input;
namespace osu.Game.Tests.Visual.UserInterface namespace osu.Game.Tests.Visual.UserInterface
{ {
[TestFixture] [TestFixture]
public class TestSceneModSelectScreen : OsuManualInputManagerTestScene public class TestSceneModSelectOverlay : OsuManualInputManagerTestScene
{ {
[Resolved] [Resolved]
private RulesetStore rulesetStore { get; set; } private RulesetStore rulesetStore { get; set; }
@ -222,7 +222,7 @@ namespace osu.Game.Tests.Visual.UserInterface
public void TestSettingsNotCrossPolluting() public void TestSettingsNotCrossPolluting()
{ {
Bindable<IReadOnlyList<Mod>> selectedMods2 = null; Bindable<IReadOnlyList<Mod>> selectedMods2 = null;
ModSelectOverlay modSelectScreen2 = null; ModSelectOverlay modSelectOverlay2 = null;
createScreen(); createScreen();
AddStep("select diff adjust", () => SelectedMods.Value = new Mod[] { new OsuModDifficultyAdjust() }); AddStep("select diff adjust", () => SelectedMods.Value = new Mod[] { new OsuModDifficultyAdjust() });
@ -235,7 +235,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("create second overlay", () => AddStep("create second overlay", () =>
{ {
Add(modSelectScreen2 = new UserModSelectOverlay().With(d => Add(modSelectOverlay2 = new UserModSelectOverlay().With(d =>
{ {
d.Origin = Anchor.TopCentre; d.Origin = Anchor.TopCentre;
d.Anchor = Anchor.TopCentre; d.Anchor = Anchor.TopCentre;
@ -243,7 +243,7 @@ namespace osu.Game.Tests.Visual.UserInterface
})); }));
}); });
AddStep("show", () => modSelectScreen2.Show()); AddStep("show", () => modSelectOverlay2.Show());
AddAssert("ensure first is unchanged", () => SelectedMods.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == 8); AddAssert("ensure first is unchanged", () => SelectedMods.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == 8);
AddAssert("ensure second is default", () => selectedMods2.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == null); AddAssert("ensure second is default", () => selectedMods2.Value.OfType<OsuModDifficultyAdjust>().Single().CircleSize.Value == null);

View File

@ -5,9 +5,9 @@ using osu.Framework.Localisation;
namespace osu.Game.Localisation namespace osu.Game.Localisation
{ {
public static class ModSelectScreenStrings public static class ModSelectOverlayStrings
{ {
private const string prefix = @"osu.Game.Resources.Localisation.ModSelectScreen"; private const string prefix = @"osu.Game.Resources.Localisation.ModSelectOverlay";
/// <summary> /// <summary>
/// "Mod Select" /// "Mod Select"
@ -26,4 +26,4 @@ namespace osu.Game.Localisation
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }
} }

View File

@ -84,8 +84,8 @@ namespace osu.Game.Overlays.Mods
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
Header.Title = ModSelectScreenStrings.ModSelectTitle; Header.Title = ModSelectOverlayStrings.ModSelectTitle;
Header.Description = ModSelectScreenStrings.ModSelectDescription; Header.Description = ModSelectOverlayStrings.ModSelectDescription;
AddRange(new Drawable[] AddRange(new Drawable[]
{ {
@ -193,7 +193,7 @@ namespace osu.Game.Overlays.Mods
State.BindValueChanged(_ => samplePlaybackDisabled.Value = State.Value == Visibility.Hidden, true); State.BindValueChanged(_ => samplePlaybackDisabled.Value = State.Value == Visibility.Hidden, true);
// This is an optimisation to prevent refreshing the available settings controls when it can be // This is an optimisation to prevent refreshing the available settings controls when it can be
// reasonably assumed that the settings panel is never to be displayed (e.g. FreeModSelectScreen). // reasonably assumed that the settings panel is never to be displayed (e.g. FreeModSelectOverlay).
if (customisationButton != null) if (customisationButton != null)
((IBindable<IReadOnlyList<Mod>>)modSettingsArea.SelectedMods).BindTo(SelectedMods); ((IBindable<IReadOnlyList<Mod>>)modSettingsArea.SelectedMods).BindTo(SelectedMods);
@ -262,7 +262,7 @@ namespace osu.Game.Overlays.Mods
{ {
customisationButton = new ShearedToggleButton(BUTTON_WIDTH) customisationButton = new ShearedToggleButton(BUTTON_WIDTH)
{ {
Text = ModSelectScreenStrings.ModCustomisation, Text = ModSelectOverlayStrings.ModCustomisation,
Active = { BindTarget = customisationVisible } Active = { BindTarget = customisationVisible }
}, },
new ShearedButton(BUTTON_WIDTH) new ShearedButton(BUTTON_WIDTH)