mirror of
https://github.com/ppy/osu.git
synced 2025-02-08 12:23:21 +08:00
Add tooltips explaining multiplayer mod selection buttons
This commit is contained in:
parent
c68a0bc7e3
commit
f88102610d
@ -24,6 +24,21 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString StartMatchWithCountdown(string humanReadableTime) => new TranslatableString(getKey(@"start_match_width_countdown"), @"Start match in {0}", humanReadableTime);
|
public static LocalisableString StartMatchWithCountdown(string humanReadableTime) => new TranslatableString(getKey(@"start_match_width_countdown"), @"Start match in {0}", humanReadableTime);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Choose the mods which all players should play with."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString RequiredModsButtonTooltip => new TranslatableString(getKey(@"required_mods_button_tooltip"), @"Choose the mods which all players should play with.");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Each player can choose their preferred mods from a selected list."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString FreeModsButtonTooltip => new TranslatableString(getKey(@"free_mods_button_tooltip"), @"Each player can choose their preferred mods from a selected list.");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Each player can choose their preferred difficulty, ruleset and mods."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString FreestyleButtonTooltip => new TranslatableString(getKey(@"freestyle_button_tooltip"), @"Each player can choose their preferred difficulty, ruleset and mods.");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay
|
namespace osu.Game.Screens.OnlinePlay
|
||||||
{
|
{
|
||||||
@ -95,6 +96,8 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
SelectedColour = colours.Yellow;
|
SelectedColour = colours.Yellow;
|
||||||
DeselectedColour = SelectedColour.Opacity(0.5f);
|
DeselectedColour = SelectedColour.Opacity(0.5f);
|
||||||
Text = @"freemods";
|
Text = @"freemods";
|
||||||
|
|
||||||
|
TooltipText = MultiplayerMatchStrings.FreeModsButtonTooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -12,6 +12,7 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay
|
namespace osu.Game.Screens.OnlinePlay
|
||||||
{
|
{
|
||||||
@ -72,6 +73,8 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
SelectedColour = colours.Yellow;
|
SelectedColour = colours.Yellow;
|
||||||
DeselectedColour = SelectedColour.Opacity(0.5f);
|
DeselectedColour = SelectedColour.Opacity(0.5f);
|
||||||
Text = @"freestyle";
|
Text = @"freestyle";
|
||||||
|
|
||||||
|
TooltipText = MultiplayerMatchStrings.FreestyleButtonTooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -21,6 +21,7 @@ using osu.Game.Rulesets.Mods;
|
|||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay
|
namespace osu.Game.Screens.OnlinePlay
|
||||||
{
|
{
|
||||||
@ -196,14 +197,16 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
IsValidMod = IsValidMod
|
IsValidMod = IsValidMod
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override IEnumerable<(FooterButton, OverlayContainer?)> CreateSongSelectFooterButtons()
|
protected override IEnumerable<(FooterButton button, OverlayContainer? overlay)> CreateSongSelectFooterButtons()
|
||||||
{
|
{
|
||||||
var baseButtons = base.CreateSongSelectFooterButtons().ToList();
|
var baseButtons = base.CreateSongSelectFooterButtons().ToList();
|
||||||
|
|
||||||
|
baseButtons.Single(i => i.button is FooterButtonMods).button.TooltipText = MultiplayerMatchStrings.RequiredModsButtonTooltip;
|
||||||
|
|
||||||
freeModsFooterButton = new FooterButtonFreeMods(freeModSelect) { Current = FreeMods };
|
freeModsFooterButton = new FooterButtonFreeMods(freeModSelect) { Current = FreeMods };
|
||||||
var freeStyleButton = new FooterButtonFreeStyle { Current = FreeStyle };
|
var freeStyleButton = new FooterButtonFreeStyle { Current = FreeStyle };
|
||||||
|
|
||||||
baseButtons.InsertRange(baseButtons.FindIndex(b => b.Item1 is FooterButtonMods) + 1, new (FooterButton, OverlayContainer?)[]
|
baseButtons.InsertRange(baseButtons.FindIndex(b => b.button is FooterButtonMods) + 1, new (FooterButton, OverlayContainer?)[]
|
||||||
{
|
{
|
||||||
(freeModsFooterButton, null),
|
(freeModsFooterButton, null),
|
||||||
(freeStyleButton, null)
|
(freeStyleButton, null)
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
protected override FilterControl CreateFilterControl() => new DifficultySelectFilterControl(item);
|
protected override FilterControl CreateFilterControl() => new DifficultySelectFilterControl(item);
|
||||||
|
|
||||||
protected override IEnumerable<(FooterButton, OverlayContainer?)> CreateSongSelectFooterButtons()
|
protected override IEnumerable<(FooterButton button, OverlayContainer? overlay)> CreateSongSelectFooterButtons()
|
||||||
{
|
{
|
||||||
// Required to create the drawable components.
|
// Required to create the drawable components.
|
||||||
base.CreateSongSelectFooterButtons();
|
base.CreateSongSelectFooterButtons();
|
||||||
|
@ -415,7 +415,7 @@ namespace osu.Game.Screens.Select
|
|||||||
/// Creates the buttons to be displayed in the footer.
|
/// Creates the buttons to be displayed in the footer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A set of <see cref="FooterButton"/> and an optional <see cref="OverlayContainer"/> which the button opens when pressed.</returns>
|
/// <returns>A set of <see cref="FooterButton"/> and an optional <see cref="OverlayContainer"/> which the button opens when pressed.</returns>
|
||||||
protected virtual IEnumerable<(FooterButton, OverlayContainer?)> CreateSongSelectFooterButtons() => new (FooterButton, OverlayContainer?)[]
|
protected virtual IEnumerable<(FooterButton button, OverlayContainer? overlay)> CreateSongSelectFooterButtons() => new (FooterButton, OverlayContainer?)[]
|
||||||
{
|
{
|
||||||
(ModsFooterButton = new FooterButtonMods { Current = Mods }, ModSelect),
|
(ModsFooterButton = new FooterButtonMods { Current = Mods }, ModSelect),
|
||||||
(new FooterButtonRandom
|
(new FooterButtonRandom
|
||||||
|
Loading…
Reference in New Issue
Block a user