mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Add SkinSettingsStrings
This commit is contained in:
parent
31ffaf15d4
commit
61502e977a
54
osu.Game/Localisation/SkinSettingsStrings.cs
Normal file
54
osu.Game/Localisation/SkinSettingsStrings.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
// 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 SkinSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.SkinSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Skin"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString SkinSectionHeader => new TranslatableString(getKey(@"skin_section_header"), @"Skin");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Skin layout editor"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString SkinLayoutEditor => new TranslatableString(getKey(@"skin_layout_editor"), @"Skin layout editor");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Gameplay cursor size"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString CursorSize => new TranslatableString(getKey(@"cursor_size"), @"Gameplay cursor size");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Adjust gameplay cursor size based on current beatmap"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString AutoCursorSize => new TranslatableString(getKey(@"auto_cursor_size"), @"Adjust gameplay cursor size based on current beatmap");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Beatmap skins"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString BeatmapSkins => new TranslatableString(getKey(@"beatmap_skins"), @"Beatmap skins");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Beatmap colours"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString BeatmapColours => new TranslatableString(getKey(@"beatmap_colours"), @"Beatmap colours");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Beatmap hitsounds"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString BeatmapHitsounds => new TranslatableString(getKey(@"beatmap_hitsounds"), @"Beatmap hitsounds");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Export selected skin"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ExportSkinButton => new TranslatableString(getKey(@"export_skin_button"), @"Export selected skin");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ using osu.Framework.Localisation;
|
|||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osu.Game.Skinning.Editor;
|
using osu.Game.Skinning.Editor;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -23,7 +24,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
{
|
{
|
||||||
private SkinSettingsDropdown skinDropdown;
|
private SkinSettingsDropdown skinDropdown;
|
||||||
|
|
||||||
public override string Header => "Skin";
|
public override LocalisableString Header => SkinSettingsStrings.SkinSectionHeader;
|
||||||
|
|
||||||
public override Drawable CreateIcon() => new SpriteIcon
|
public override Drawable CreateIcon() => new SpriteIcon
|
||||||
{
|
{
|
||||||
@ -69,34 +70,34 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
skinDropdown = new SkinSettingsDropdown(),
|
skinDropdown = new SkinSettingsDropdown(),
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Skin layout editor",
|
Text = SkinSettingsStrings.SkinLayoutEditor,
|
||||||
Action = () => skinEditor?.Toggle(),
|
Action = () => skinEditor?.Toggle(),
|
||||||
},
|
},
|
||||||
new ExportSkinButton(),
|
new ExportSkinButton(),
|
||||||
new SettingsSlider<float, SizeSlider>
|
new SettingsSlider<float, SizeSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Gameplay cursor size",
|
LabelText = SkinSettingsStrings.CursorSize,
|
||||||
Current = config.GetBindable<float>(OsuSetting.GameplayCursorSize),
|
Current = config.GetBindable<float>(OsuSetting.GameplayCursorSize),
|
||||||
KeyboardStep = 0.01f
|
KeyboardStep = 0.01f
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Adjust gameplay cursor size based on current beatmap",
|
LabelText = SkinSettingsStrings.AutoCursorSize,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.AutoCursorSize)
|
Current = config.GetBindable<bool>(OsuSetting.AutoCursorSize)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Beatmap skins",
|
LabelText = SkinSettingsStrings.BeatmapSkins,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins)
|
Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Beatmap colours",
|
LabelText = SkinSettingsStrings.BeatmapColours,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapColours)
|
Current = config.GetBindable<bool>(OsuSetting.BeatmapColours)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Beatmap hitsounds",
|
LabelText = SkinSettingsStrings.BeatmapHitsounds,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds)
|
Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -200,7 +201,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Text = "Export selected skin";
|
Text = SkinSettingsStrings.ExportSkinButton;
|
||||||
Action = export;
|
Action = export;
|
||||||
|
|
||||||
currentSkin = skins.CurrentSkin.GetBoundCopy();
|
currentSkin = skins.CurrentSkin.GetBoundCopy();
|
||||||
|
Loading…
Reference in New Issue
Block a user