1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:52:55 +08:00

Merge branch 'master' into update-framework

This commit is contained in:
Dean Herbert 2021-09-16 22:49:02 +09:00 committed by GitHub
commit fde7c88999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 427 additions and 107 deletions

View File

@ -20,6 +20,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Rulesets.Osu.Skinning.Default;
using osu.Game.Skinning;
using osu.Game.Storyboards;
using osu.Game.Tests.Visual;
@ -86,9 +87,9 @@ namespace osu.Game.Rulesets.Osu.Tests
if (firstObject == null)
return false;
var skinnable = firstObject.ApproachCircle.Child as SkinnableDrawable;
var skinnable = firstObject.ApproachCircle;
if (skin == null && skinnable?.Drawable is Sprite)
if (skin == null && skinnable?.Drawable is DefaultApproachCircle)
// check for default skin provider
return true;

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public OsuAction? HitAction => HitArea.HitAction;
protected virtual OsuSkinComponents CirclePieceComponent => OsuSkinComponents.HitCircle;
public ApproachCircle ApproachCircle { get; private set; }
public SkinnableDrawable ApproachCircle { get; private set; }
public HitReceptor HitArea { get; private set; }
public SkinnableDrawable CirclePiece { get; private set; }
@ -75,8 +75,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
ApproachCircle = new ApproachCircle
ApproachCircle = new ProxyableSkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.ApproachCircle), _ => new DefaultApproachCircle())
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Alpha = 0,
Scale = new Vector2(4),
}
@ -89,7 +92,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
PositionBindable.BindValueChanged(_ => Position = HitObject.StackedPosition);
StackHeightBindable.BindValueChanged(_ => Position = HitObject.StackedPosition);
ScaleBindable.BindValueChanged(scale => scaleContainer.Scale = new Vector2(scale.NewValue));
AccentColour.BindValueChanged(accent => ApproachCircle.Colour = accent.NewValue);
}
protected override void LoadComplete()
@ -251,5 +253,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
}
}
private class ProxyableSkinnableDrawable : SkinnableDrawable
{
public override bool RemoveWhenNotAlive => false;
public ProxyableSkinnableDrawable(ISkinComponent component, Func<ISkinComponent, Drawable> defaultImplementation = null, ConfineMode confineMode = ConfineMode.NoScaling)
: base(component, defaultImplementation, confineMode)
{
}
}
}
}

View File

@ -18,5 +18,6 @@ namespace osu.Game.Rulesets.Osu
SliderBall,
SliderBody,
SpinnerBody,
ApproachCircle,
}
}

View File

@ -1,50 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Textures;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public class ApproachCircle : Container
{
public override bool RemoveWhenNotAlive => false;
public ApproachCircle()
{
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
Child = new SkinnableApproachCircle();
}
private class SkinnableApproachCircle : SkinnableSprite
{
public SkinnableApproachCircle()
: base("Gameplay/osu/approachcircle")
{
}
protected override Drawable CreateDefault(ISkinComponent component)
{
var drawable = base.CreateDefault(component);
// account for the sprite being used for the default approach circle being taken from stable,
// when hitcircles have 5px padding on each size. this should be removed if we update the sprite.
drawable.Scale = new Vector2(128 / 118f);
return drawable;
}
}
}
}

View File

@ -0,0 +1,49 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public class DefaultApproachCircle : SkinnableSprite
{
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
[Resolved]
private DrawableHitObject drawableObject { get; set; }
public DefaultApproachCircle()
: base("Gameplay/osu/approachcircle")
{
}
[BackgroundDependencyLoader]
private void load()
{
accentColour.BindTo(drawableObject.AccentColour);
}
protected override void LoadComplete()
{
base.LoadComplete();
accentColour.BindValueChanged(colour => Colour = colour.NewValue, true);
}
protected override Drawable CreateDefault(ISkinComponent component)
{
var drawable = base.CreateDefault(component);
// Although this is a non-legacy component, osu-resources currently stores approach circle as a legacy-like texture.
// See LegacyApproachCircle for documentation as to why this is required.
drawable.Scale = new Vector2(128 / 118f);
return drawable;
}
}
}

View File

@ -0,0 +1,49 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Skinning.Legacy
{
public class LegacyApproachCircle : SkinnableSprite
{
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
[Resolved]
private DrawableHitObject drawableObject { get; set; }
public LegacyApproachCircle()
: base("Gameplay/osu/approachcircle")
{
}
[BackgroundDependencyLoader]
private void load()
{
accentColour.BindTo(drawableObject.AccentColour);
}
protected override void LoadComplete()
{
base.LoadComplete();
accentColour.BindValueChanged(colour => Colour = LegacyColourCompatibility.DisallowZeroAlpha(colour.NewValue), true);
}
protected override Drawable CreateDefault(ISkinComponent component)
{
var drawable = base.CreateDefault(component);
// account for the sprite being used for the default approach circle being taken from stable,
// when hitcircles have 5px padding on each size. this should be removed if we update the sprite.
drawable.Scale = new Vector2(128 / 118f);
return drawable;
}
}
}

View File

@ -108,6 +108,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
return new LegacyOldStyleSpinner();
return null;
case OsuSkinComponents.ApproachCircle:
return new LegacyApproachCircle();
}
}

View File

@ -234,7 +234,7 @@ namespace osu.Game.Tests.Visual.Settings
{
AddAssert($"Check {name} is bound to {keyName}", () =>
{
var firstRow = panel.ChildrenOfType<KeyBindingRow>().First(r => r.ChildrenOfType<OsuSpriteText>().Any(s => s.Text == name));
var firstRow = panel.ChildrenOfType<KeyBindingRow>().First(r => r.ChildrenOfType<OsuSpriteText>().Any(s => s.Text.ToString() == name));
var firstButton = firstRow.ChildrenOfType<KeyBindingRow.KeyButton>().First();
return firstButton.Text.Text == keyName;
@ -247,7 +247,7 @@ namespace osu.Game.Tests.Visual.Settings
AddStep($"Scroll to {name}", () =>
{
var firstRow = panel.ChildrenOfType<KeyBindingRow>().First(r => r.ChildrenOfType<OsuSpriteText>().Any(s => s.Text == name));
var firstRow = panel.ChildrenOfType<KeyBindingRow>().First(r => r.ChildrenOfType<OsuSpriteText>().Any(s => s.Text.ToString() == name));
firstButton = firstRow.ChildrenOfType<KeyBindingRow.KeyButton>().First();
panel.ChildrenOfType<SettingsPanel.SettingsSectionsContainer>().First().ScrollTo(firstButton);

View File

@ -2,11 +2,12 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Localisation;
using osu.Game.Localisation;
namespace osu.Game.Input.Bindings
{
@ -137,152 +138,152 @@ namespace osu.Game.Input.Bindings
public enum GlobalAction
{
[Description("Toggle chat overlay")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleChat))]
ToggleChat,
[Description("Toggle social overlay")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleSocial))]
ToggleSocial,
[Description("Reset input settings")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ResetInputSettings))]
ResetInputSettings,
[Description("Toggle toolbar")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleToolbar))]
ToggleToolbar,
[Description("Toggle settings")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleSettings))]
ToggleSettings,
[Description("Toggle beatmap listing")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleBeatmapListing))]
ToggleBeatmapListing,
[Description("Increase volume")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.IncreaseVolume))]
IncreaseVolume,
[Description("Decrease volume")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.DecreaseVolume))]
DecreaseVolume,
[Description("Toggle mute")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleMute))]
ToggleMute,
// In-Game Keybindings
[Description("Skip cutscene")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SkipCutscene))]
SkipCutscene,
[Description("Quick retry (hold)")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.QuickRetry))]
QuickRetry,
[Description("Take screenshot")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.TakeScreenshot))]
TakeScreenshot,
[Description("Toggle gameplay mouse buttons")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleGameplayMouseButtons))]
ToggleGameplayMouseButtons,
[Description("Back")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.Back))]
Back,
[Description("Increase scroll speed")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.IncreaseScrollSpeed))]
IncreaseScrollSpeed,
[Description("Decrease scroll speed")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.DecreaseScrollSpeed))]
DecreaseScrollSpeed,
[Description("Select")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.Select))]
Select,
[Description("Quick exit (hold)")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.QuickExit))]
QuickExit,
// Game-wide beatmap music controller keybindings
[Description("Next track")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.MusicNext))]
MusicNext,
[Description("Previous track")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.MusicPrev))]
MusicPrev,
[Description("Play / pause")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.MusicPlay))]
MusicPlay,
[Description("Toggle now playing overlay")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleNowPlaying))]
ToggleNowPlaying,
[Description("Previous selection")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SelectPrevious))]
SelectPrevious,
[Description("Next selection")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SelectNext))]
SelectNext,
[Description("Home")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.Home))]
Home,
[Description("Toggle notifications")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleNotifications))]
ToggleNotifications,
[Description("Pause gameplay")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.PauseGameplay))]
PauseGameplay,
// Editor
[Description("Setup mode")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorSetupMode))]
EditorSetupMode,
[Description("Compose mode")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorComposeMode))]
EditorComposeMode,
[Description("Design mode")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorDesignMode))]
EditorDesignMode,
[Description("Timing mode")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorTimingMode))]
EditorTimingMode,
[Description("Hold for HUD")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.HoldForHUD))]
HoldForHUD,
[Description("Random skin")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.RandomSkin))]
RandomSkin,
[Description("Pause / resume replay")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.TogglePauseReplay))]
TogglePauseReplay,
[Description("Toggle in-game interface")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleInGameInterface))]
ToggleInGameInterface,
// Song select keybindings
[Description("Toggle Mod Select")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleModSelection))]
ToggleModSelection,
[Description("Random")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SelectNextRandom))]
SelectNextRandom,
[Description("Rewind")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SelectPreviousRandom))]
SelectPreviousRandom,
[Description("Beatmap Options")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleBeatmapOptions))]
ToggleBeatmapOptions,
[Description("Verify mode")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorVerifyMode))]
EditorVerifyMode,
[Description("Nudge selection left")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorNudgeLeft))]
EditorNudgeLeft,
[Description("Nudge selection right")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorNudgeRight))]
EditorNudgeRight,
[Description("Toggle skin editor")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleSkinEditor))]
ToggleSkinEditor,
[Description("Previous volume meter")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.PreviousVolumeMeter))]
PreviousVolumeMeter,
[Description("Next volume meter")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.NextVolumeMeter))]
NextVolumeMeter,
[Description("Seek replay forward")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SeekReplayForward))]
SeekReplayForward,
[Description("Seek replay backward")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.SeekReplayBackward))]
SeekReplayBackward,
[Description("Toggle chat focus")]
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleChatFocus))]
ToggleChatFocus
}
}

View File

@ -0,0 +1,254 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Localisation;
namespace osu.Game.Localisation
{
public static class GlobalActionKeyBindingStrings
{
private const string prefix = @"osu.Game.Resources.Localisation.GlobalActionKeyBinding";
/// <summary>
/// "Toggle chat overlay"
/// </summary>
public static LocalisableString ToggleChat => new TranslatableString(getKey(@"toggle_chat"), @"Toggle chat overlay");
/// <summary>
/// "Toggle social overlay"
/// </summary>
public static LocalisableString ToggleSocial => new TranslatableString(getKey(@"toggle_social"), @"Toggle social overlay");
/// <summary>
/// "Reset input settings"
/// </summary>
public static LocalisableString ResetInputSettings => new TranslatableString(getKey(@"reset_input_settings"), @"Reset input settings");
/// <summary>
/// "Toggle toolbar"
/// </summary>
public static LocalisableString ToggleToolbar => new TranslatableString(getKey(@"toggle_toolbar"), @"Toggle toolbar");
/// <summary>
/// "Toggle settings"
/// </summary>
public static LocalisableString ToggleSettings => new TranslatableString(getKey(@"toggle_settings"), @"Toggle settings");
/// <summary>
/// "Toggle beatmap listing"
/// </summary>
public static LocalisableString ToggleBeatmapListing => new TranslatableString(getKey(@"toggle_beatmap_listing"), @"Toggle beatmap listing");
/// <summary>
/// "Increase volume"
/// </summary>
public static LocalisableString IncreaseVolume => new TranslatableString(getKey(@"increase_volume"), @"Increase volume");
/// <summary>
/// "Decrease volume"
/// </summary>
public static LocalisableString DecreaseVolume => new TranslatableString(getKey(@"decrease_volume"), @"Decrease volume");
/// <summary>
/// "Toggle mute"
/// </summary>
public static LocalisableString ToggleMute => new TranslatableString(getKey(@"toggle_mute"), @"Toggle mute");
/// <summary>
/// "Skip cutscene"
/// </summary>
public static LocalisableString SkipCutscene => new TranslatableString(getKey(@"skip_cutscene"), @"Skip cutscene");
/// <summary>
/// "Quick retry (hold)"
/// </summary>
public static LocalisableString QuickRetry => new TranslatableString(getKey(@"quick_retry"), @"Quick retry (hold)");
/// <summary>
/// "Take screenshot"
/// </summary>
public static LocalisableString TakeScreenshot => new TranslatableString(getKey(@"take_screenshot"), @"Take screenshot");
/// <summary>
/// "Toggle gameplay mouse buttons"
/// </summary>
public static LocalisableString ToggleGameplayMouseButtons => new TranslatableString(getKey(@"toggle_gameplay_mouse_buttons"), @"Toggle gameplay mouse buttons");
/// <summary>
/// "Back"
/// </summary>
public static LocalisableString Back => new TranslatableString(getKey(@"back"), @"Back");
/// <summary>
/// "Increase scroll speed"
/// </summary>
public static LocalisableString IncreaseScrollSpeed => new TranslatableString(getKey(@"increase_scroll_speed"), @"Increase scroll speed");
/// <summary>
/// "Decrease scroll speed"
/// </summary>
public static LocalisableString DecreaseScrollSpeed => new TranslatableString(getKey(@"decrease_scroll_speed"), @"Decrease scroll speed");
/// <summary>
/// "Select"
/// </summary>
public static LocalisableString Select => new TranslatableString(getKey(@"select"), @"Select");
/// <summary>
/// "Quick exit (hold)"
/// </summary>
public static LocalisableString QuickExit => new TranslatableString(getKey(@"quick_exit"), @"Quick exit (hold)");
/// <summary>
/// "Next track"
/// </summary>
public static LocalisableString MusicNext => new TranslatableString(getKey(@"music_next"), @"Next track");
/// <summary>
/// "Previous track"
/// </summary>
public static LocalisableString MusicPrev => new TranslatableString(getKey(@"music_prev"), @"Previous track");
/// <summary>
/// "Play / pause"
/// </summary>
public static LocalisableString MusicPlay => new TranslatableString(getKey(@"music_play"), @"Play / pause");
/// <summary>
/// "Toggle now playing overlay"
/// </summary>
public static LocalisableString ToggleNowPlaying => new TranslatableString(getKey(@"toggle_now_playing"), @"Toggle now playing overlay");
/// <summary>
/// "Previous selection"
/// </summary>
public static LocalisableString SelectPrevious => new TranslatableString(getKey(@"select_previous"), @"Previous selection");
/// <summary>
/// "Next selection"
/// </summary>
public static LocalisableString SelectNext => new TranslatableString(getKey(@"select_next"), @"Next selection");
/// <summary>
/// "Home"
/// </summary>
public static LocalisableString Home => new TranslatableString(getKey(@"home"), @"Home");
/// <summary>
/// "Toggle notifications"
/// </summary>
public static LocalisableString ToggleNotifications => new TranslatableString(getKey(@"toggle_notifications"), @"Toggle notifications");
/// <summary>
/// "Pause gameplay"
/// </summary>
public static LocalisableString PauseGameplay => new TranslatableString(getKey(@"pause_gameplay"), @"Pause gameplay");
/// <summary>
/// "Setup mode"
/// </summary>
public static LocalisableString EditorSetupMode => new TranslatableString(getKey(@"editor_setup_mode"), @"Setup mode");
/// <summary>
/// "Compose mode"
/// </summary>
public static LocalisableString EditorComposeMode => new TranslatableString(getKey(@"editor_compose_mode"), @"Compose mode");
/// <summary>
/// "Design mode"
/// </summary>
public static LocalisableString EditorDesignMode => new TranslatableString(getKey(@"editor_design_mode"), @"Design mode");
/// <summary>
/// "Timing mode"
/// </summary>
public static LocalisableString EditorTimingMode => new TranslatableString(getKey(@"editor_timing_mode"), @"Timing mode");
/// <summary>
/// "Hold for HUD"
/// </summary>
public static LocalisableString HoldForHUD => new TranslatableString(getKey(@"hold_for_hud"), @"Hold for HUD");
/// <summary>
/// "Random skin"
/// </summary>
public static LocalisableString RandomSkin => new TranslatableString(getKey(@"random_skin"), @"Random skin");
/// <summary>
/// "Pause / resume replay"
/// </summary>
public static LocalisableString TogglePauseReplay => new TranslatableString(getKey(@"toggle_pause_replay"), @"Pause / resume replay");
/// <summary>
/// "Toggle in-game interface"
/// </summary>
public static LocalisableString ToggleInGameInterface => new TranslatableString(getKey(@"toggle_in_game_interface"), @"Toggle in-game interface");
/// <summary>
/// "Toggle Mod Select"
/// </summary>
public static LocalisableString ToggleModSelection => new TranslatableString(getKey(@"toggle_mod_selection"), @"Toggle Mod Select");
/// <summary>
/// "Random"
/// </summary>
public static LocalisableString SelectNextRandom => new TranslatableString(getKey(@"select_next_random"), @"Random");
/// <summary>
/// "Rewind"
/// </summary>
public static LocalisableString SelectPreviousRandom => new TranslatableString(getKey(@"select_previous_random"), @"Rewind");
/// <summary>
/// "Beatmap Options"
/// </summary>
public static LocalisableString ToggleBeatmapOptions => new TranslatableString(getKey(@"toggle_beatmap_options"), @"Beatmap Options");
/// <summary>
/// "Verify mode"
/// </summary>
public static LocalisableString EditorVerifyMode => new TranslatableString(getKey(@"editor_verify_mode"), @"Verify mode");
/// <summary>
/// "Nudge selection left"
/// </summary>
public static LocalisableString EditorNudgeLeft => new TranslatableString(getKey(@"editor_nudge_left"), @"Nudge selection left");
/// <summary>
/// "Nudge selection right"
/// </summary>
public static LocalisableString EditorNudgeRight => new TranslatableString(getKey(@"editor_nudge_right"), @"Nudge selection right");
/// <summary>
/// "Toggle skin editor"
/// </summary>
public static LocalisableString ToggleSkinEditor => new TranslatableString(getKey(@"toggle_skin_editor"), @"Toggle skin editor");
/// <summary>
/// "Previous volume meter"
/// </summary>
public static LocalisableString PreviousVolumeMeter => new TranslatableString(getKey(@"previous_volume_meter"), @"Previous volume meter");
/// <summary>
/// "Next volume meter"
/// </summary>
public static LocalisableString NextVolumeMeter => new TranslatableString(getKey(@"next_volume_meter"), @"Next volume meter");
/// <summary>
/// "Seek replay forward"
/// </summary>
public static LocalisableString SeekReplayForward => new TranslatableString(getKey(@"seek_replay_forward"), @"Seek replay forward");
/// <summary>
/// "Seek replay backward"
/// </summary>
public static LocalisableString SeekReplayBackward => new TranslatableString(getKey(@"seek_replay_backward"), @"Seek replay backward");
/// <summary>
/// "Toggle chat focus"
/// </summary>
public static LocalisableString ToggleChatFocus => new TranslatableString(getKey(@"toggle_chat_focus"), @"Toggle chat focus");
private static string getKey(string key) => $"{prefix}:{key}";
}
}

View File

@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
},
text = new OsuSpriteText
{
Text = action.GetDescription(),
Text = action.GetLocalisableDescription(),
Margin = new MarginPadding(padding),
},
buttons = new FillFlowContainer<KeyButton>