mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Merge branch 'master' into add-supporter-glow-changelog
This commit is contained in:
commit
8cba1f197b
@ -1,8 +1,10 @@
|
||||
// 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 System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -174,6 +176,60 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
checkBindableAtValue("Circle Size", null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestModSettingChangeTracker()
|
||||
{
|
||||
ModSettingChangeTracker tracker = null;
|
||||
Queue<Mod> settingsChangedQueue = null;
|
||||
|
||||
setBeatmapWithDifficultyParameters(5);
|
||||
|
||||
AddStep("add mod settings change tracker", () =>
|
||||
{
|
||||
settingsChangedQueue = new Queue<Mod>();
|
||||
|
||||
tracker = new ModSettingChangeTracker(modDifficultyAdjust.Yield())
|
||||
{
|
||||
SettingChanged = settingsChangedQueue.Enqueue
|
||||
};
|
||||
});
|
||||
|
||||
AddAssert("no settings changed", () => settingsChangedQueue.Count == 0);
|
||||
|
||||
setSliderValue("Circle Size", 3);
|
||||
|
||||
settingsChangedFired();
|
||||
|
||||
setSliderValue("Circle Size", 5);
|
||||
checkBindableAtValue("Circle Size", 5);
|
||||
|
||||
settingsChangedFired();
|
||||
|
||||
AddStep("reset mod settings", () => modDifficultyAdjust.CircleSize.SetDefault());
|
||||
checkBindableAtValue("Circle Size", null);
|
||||
|
||||
settingsChangedFired();
|
||||
|
||||
setExtendedLimits(true);
|
||||
|
||||
settingsChangedFired();
|
||||
|
||||
AddStep("dispose tracker", () =>
|
||||
{
|
||||
tracker.Dispose();
|
||||
tracker = null;
|
||||
});
|
||||
|
||||
void settingsChangedFired()
|
||||
{
|
||||
AddAssert("setting changed event fired", () =>
|
||||
{
|
||||
settingsChangedQueue.Dequeue();
|
||||
return settingsChangedQueue.Count == 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void resetToDefault(string name)
|
||||
{
|
||||
AddStep($"Reset {name} to default", () =>
|
||||
|
64
osu.Game/Localisation/AudioSettingsStrings.cs
Normal file
64
osu.Game/Localisation/AudioSettingsStrings.cs
Normal file
@ -0,0 +1,64 @@
|
||||
// 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 AudioSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.AudioSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Audio"
|
||||
/// </summary>
|
||||
public static LocalisableString AudioSectionHeader => new TranslatableString(getKey(@"audio_section_header"), @"Audio");
|
||||
|
||||
/// <summary>
|
||||
/// "Devices"
|
||||
/// </summary>
|
||||
public static LocalisableString AudioDevicesHeader => new TranslatableString(getKey(@"audio_devices_header"), @"Devices");
|
||||
|
||||
/// <summary>
|
||||
/// "Volume"
|
||||
/// </summary>
|
||||
public static LocalisableString VolumeHeader => new TranslatableString(getKey(@"volume_header"), @"Volume");
|
||||
|
||||
/// <summary>
|
||||
/// "Master"
|
||||
/// </summary>
|
||||
public static LocalisableString MasterVolume => new TranslatableString(getKey(@"master_volume"), @"Master");
|
||||
|
||||
/// <summary>
|
||||
/// "Master (window inactive)"
|
||||
/// </summary>
|
||||
public static LocalisableString MasterVolumeInactive => new TranslatableString(getKey(@"master_volume_inactive"), @"Master (window inactive)");
|
||||
|
||||
/// <summary>
|
||||
/// "Effect"
|
||||
/// </summary>
|
||||
public static LocalisableString EffectVolume => new TranslatableString(getKey(@"effect_volume"), @"Effect");
|
||||
|
||||
/// <summary>
|
||||
/// "Music"
|
||||
/// </summary>
|
||||
public static LocalisableString MusicVolume => new TranslatableString(getKey(@"music_volume"), @"Music");
|
||||
|
||||
/// <summary>
|
||||
/// "Offset Adjustment"
|
||||
/// </summary>
|
||||
public static LocalisableString OffsetHeader => new TranslatableString(getKey(@"offset_header"), @"Offset Adjustment");
|
||||
|
||||
/// <summary>
|
||||
/// "Audio offset"
|
||||
/// </summary>
|
||||
public static LocalisableString AudioOffset => new TranslatableString(getKey(@"audio_offset"), @"Audio offset");
|
||||
|
||||
/// <summary>
|
||||
/// "Offset wizard"
|
||||
/// </summary>
|
||||
public static LocalisableString OffsetWizard => new TranslatableString(getKey(@"offset_wizard"), @"Offset wizard");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
@ -14,11 +14,21 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString Cancel => new TranslatableString(getKey(@"cancel"), @"Cancel");
|
||||
|
||||
/// <summary>
|
||||
/// "Clear"
|
||||
/// </summary>
|
||||
public static LocalisableString Clear => new TranslatableString(getKey(@"clear"), @"Clear");
|
||||
|
||||
/// <summary>
|
||||
/// "Enabled"
|
||||
/// </summary>
|
||||
public static LocalisableString Enabled => new TranslatableString(getKey(@"enabled"), @"Enabled");
|
||||
|
||||
/// <summary>
|
||||
/// "Default"
|
||||
/// </summary>
|
||||
public static LocalisableString Default => new TranslatableString(getKey(@"default"), @"Default");
|
||||
|
||||
/// <summary>
|
||||
/// "Width"
|
||||
/// </summary>
|
||||
@ -31,4 +41,4 @@ namespace osu.Game.Localisation
|
||||
|
||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
49
osu.Game/Localisation/DebugSettingsStrings.cs
Normal file
49
osu.Game/Localisation/DebugSettingsStrings.cs
Normal 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.Localisation;
|
||||
|
||||
namespace osu.Game.Localisation
|
||||
{
|
||||
public static class DebugSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.DebugSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Debug"
|
||||
/// </summary>
|
||||
public static LocalisableString DebugSectionHeader => new TranslatableString(getKey(@"debug_section_header"), @"Debug");
|
||||
|
||||
/// <summary>
|
||||
/// "General"
|
||||
/// </summary>
|
||||
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
|
||||
|
||||
/// <summary>
|
||||
/// "Show log overlay"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowLogOverlay => new TranslatableString(getKey(@"show_log_overlay"), @"Show log overlay");
|
||||
|
||||
/// <summary>
|
||||
/// "Bypass front-to-back render pass"
|
||||
/// </summary>
|
||||
public static LocalisableString BypassFrontToBackPass => new TranslatableString(getKey(@"bypass_front_to_back_pass"), @"Bypass front-to-back render pass");
|
||||
|
||||
/// <summary>
|
||||
/// "Import files"
|
||||
/// </summary>
|
||||
public static LocalisableString ImportFiles => new TranslatableString(getKey(@"import_files"), @"Import files");
|
||||
|
||||
/// <summary>
|
||||
/// "Memory"
|
||||
/// </summary>
|
||||
public static LocalisableString MemoryHeader => new TranslatableString(getKey(@"memory_header"), @"Memory");
|
||||
|
||||
/// <summary>
|
||||
/// "Clear all caches"
|
||||
/// </summary>
|
||||
public static LocalisableString ClearAllCaches => new TranslatableString(getKey(@"clear_all_caches"), @"Clear all caches");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
94
osu.Game/Localisation/GameplaySettingsStrings.cs
Normal file
94
osu.Game/Localisation/GameplaySettingsStrings.cs
Normal file
@ -0,0 +1,94 @@
|
||||
// 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 GameplaySettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.GameplaySettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Gameplay"
|
||||
/// </summary>
|
||||
public static LocalisableString GameplaySectionHeader => new TranslatableString(getKey(@"gameplay_section_header"), @"Gameplay");
|
||||
|
||||
/// <summary>
|
||||
/// "General"
|
||||
/// </summary>
|
||||
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
|
||||
|
||||
/// <summary>
|
||||
/// "Background dim"
|
||||
/// </summary>
|
||||
public static LocalisableString BackgroundDim => new TranslatableString(getKey(@"dim"), @"Background dim");
|
||||
|
||||
/// <summary>
|
||||
/// "Background blur"
|
||||
/// </summary>
|
||||
public static LocalisableString BackgroundBlur => new TranslatableString(getKey(@"blur"), @"Background blur");
|
||||
|
||||
/// <summary>
|
||||
/// "Lighten playfield during breaks"
|
||||
/// </summary>
|
||||
public static LocalisableString LightenDuringBreaks => new TranslatableString(getKey(@"lighten_during_breaks"), @"Lighten playfield during breaks");
|
||||
|
||||
/// <summary>
|
||||
/// "HUD overlay visibility mode"
|
||||
/// </summary>
|
||||
public static LocalisableString HUDVisibilityMode => new TranslatableString(getKey(@"hud_visibility_mode"), @"HUD overlay visibility mode");
|
||||
|
||||
/// <summary>
|
||||
/// "Show difficulty graph on progress bar"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowDifficultyGraph => new TranslatableString(getKey(@"show_difficulty_graph"), @"Show difficulty graph on progress bar");
|
||||
|
||||
/// <summary>
|
||||
/// "Show health display even when you can't fail"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowHealthDisplayWhenCantFail => new TranslatableString(getKey(@"show_health_display_when_cant_fail"), @"Show health display even when you can't fail");
|
||||
|
||||
/// <summary>
|
||||
/// "Fade playfield to red when health is low"
|
||||
/// </summary>
|
||||
public static LocalisableString FadePlayfieldWhenHealthLow => new TranslatableString(getKey(@"fade_playfield_when_health_low"), @"Fade playfield to red when health is low");
|
||||
|
||||
/// <summary>
|
||||
/// "Always show key overlay"
|
||||
/// </summary>
|
||||
public static LocalisableString AlwaysShowKeyOverlay => new TranslatableString(getKey(@"key_overlay"), @"Always show key overlay");
|
||||
|
||||
/// <summary>
|
||||
/// "Positional hitsounds"
|
||||
/// </summary>
|
||||
public static LocalisableString PositionalHitsounds => new TranslatableString(getKey(@"positional_hitsounds"), @"Positional hitsounds");
|
||||
|
||||
/// <summary>
|
||||
/// "Always play first combo break sound"
|
||||
/// </summary>
|
||||
public static LocalisableString AlwaysPlayFirstComboBreak => new TranslatableString(getKey(@"always_play_first_combo_break"), @"Always play first combo break sound");
|
||||
|
||||
/// <summary>
|
||||
/// "Score display mode"
|
||||
/// </summary>
|
||||
public static LocalisableString ScoreDisplayMode => new TranslatableString(getKey(@"score_display_mode"), @"Score display mode");
|
||||
|
||||
/// <summary>
|
||||
/// "Disable Windows key during gameplay"
|
||||
/// </summary>
|
||||
public static LocalisableString DisableWinKey => new TranslatableString(getKey(@"disable_win_key"), @"Disable Windows key during gameplay");
|
||||
|
||||
/// <summary>
|
||||
/// "Mods"
|
||||
/// </summary>
|
||||
public static LocalisableString ModsHeader => new TranslatableString(getKey(@"mods_header"), @"Mods");
|
||||
|
||||
/// <summary>
|
||||
/// "Increase visibility of first object when visual impairment mods are enabled"
|
||||
/// </summary>
|
||||
public static LocalisableString IncreaseFirstObjectVisibility => new TranslatableString(getKey(@"increase_first_object_visibility"), @"Increase visibility of first object when visual impairment mods are enabled");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
59
osu.Game/Localisation/GeneralSettingsStrings.cs
Normal file
59
osu.Game/Localisation/GeneralSettingsStrings.cs
Normal file
@ -0,0 +1,59 @@
|
||||
// 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 GeneralSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.GeneralSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "General"
|
||||
/// </summary>
|
||||
public static LocalisableString GeneralSectionHeader => new TranslatableString(getKey(@"general_section_header"), @"General");
|
||||
|
||||
/// <summary>
|
||||
/// "Language"
|
||||
/// </summary>
|
||||
public static LocalisableString LanguageHeader => new TranslatableString(getKey(@"language_header"), @"Language");
|
||||
|
||||
/// <summary>
|
||||
/// "Language"
|
||||
/// </summary>
|
||||
public static LocalisableString LanguageDropdown => new TranslatableString(getKey(@"language_dropdown"), @"Language");
|
||||
|
||||
/// <summary>
|
||||
/// "Prefer metadata in original language"
|
||||
/// </summary>
|
||||
public static LocalisableString PreferOriginalMetadataLanguage => new TranslatableString(getKey(@"prefer_original"), @"Prefer metadata in original language");
|
||||
|
||||
/// <summary>
|
||||
/// "Updates"
|
||||
/// </summary>
|
||||
public static LocalisableString UpdateHeader => new TranslatableString(getKey(@"update_header"), @"Updates");
|
||||
|
||||
/// <summary>
|
||||
/// "Release stream"
|
||||
/// </summary>
|
||||
public static LocalisableString ReleaseStream => new TranslatableString(getKey(@"release_stream"), @"Release stream");
|
||||
|
||||
/// <summary>
|
||||
/// "Check for updates"
|
||||
/// </summary>
|
||||
public static LocalisableString CheckUpdate => new TranslatableString(getKey(@"check_update"), @"Check for updates");
|
||||
|
||||
/// <summary>
|
||||
/// "Open osu! folder"
|
||||
/// </summary>
|
||||
public static LocalisableString OpenOsuFolder => new TranslatableString(getKey(@"open_osu_folder"), @"Open osu! folder");
|
||||
|
||||
/// <summary>
|
||||
/// "Change folder location..."
|
||||
/// </summary>
|
||||
public static LocalisableString ChangeFolderLocation => new TranslatableString(getKey(@"change_folder_location"), @"Change folder location...");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
119
osu.Game/Localisation/GraphicsSettingsStrings.cs
Normal file
119
osu.Game/Localisation/GraphicsSettingsStrings.cs
Normal file
@ -0,0 +1,119 @@
|
||||
// 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 GraphicsSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.GraphicsSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Graphics"
|
||||
/// </summary>
|
||||
public static LocalisableString GraphicsSectionHeader => new TranslatableString(getKey(@"graphics_section_header"), @"Graphics");
|
||||
|
||||
/// <summary>
|
||||
/// "Renderer"
|
||||
/// </summary>
|
||||
public static LocalisableString RendererHeader => new TranslatableString(getKey(@"renderer_header"), @"Renderer");
|
||||
|
||||
/// <summary>
|
||||
/// "Frame limiter"
|
||||
/// </summary>
|
||||
public static LocalisableString FrameLimiter => new TranslatableString(getKey(@"frame_limiter"), @"Frame limiter");
|
||||
|
||||
/// <summary>
|
||||
/// "Threading mode"
|
||||
/// </summary>
|
||||
public static LocalisableString ThreadingMode => new TranslatableString(getKey(@"threading_mode"), @"Threading mode");
|
||||
|
||||
/// <summary>
|
||||
/// "Show FPS"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowFPS => new TranslatableString(getKey(@"show_fps"), @"Show FPS");
|
||||
|
||||
/// <summary>
|
||||
/// "Using unlimited frame limiter can lead to stutters, bad performance and overheating. It will not improve perceived latency. "2x refresh rate" is recommended."
|
||||
/// </summary>
|
||||
public static LocalisableString UnlimitedFramesNote => new TranslatableString(getKey(@"unlimited_frames_note"), @"Using unlimited frame limiter can lead to stutters, bad performance and overheating. It will not improve perceived latency. ""2x refresh rate"" is recommended.");
|
||||
|
||||
/// <summary>
|
||||
/// "Layout"
|
||||
/// </summary>
|
||||
public static LocalisableString LayoutHeader => new TranslatableString(getKey(@"layout_header"), @"Layout");
|
||||
|
||||
/// <summary>
|
||||
/// "Screen mode"
|
||||
/// </summary>
|
||||
public static LocalisableString ScreenMode => new TranslatableString(getKey(@"screen_mode"), @"Screen mode");
|
||||
|
||||
/// <summary>
|
||||
/// "Resolution"
|
||||
/// </summary>
|
||||
public static LocalisableString Resolution => new TranslatableString(getKey(@"resolution"), @"Resolution");
|
||||
|
||||
/// <summary>
|
||||
/// "UI scaling"
|
||||
/// </summary>
|
||||
public static LocalisableString UIScaling => new TranslatableString(getKey(@"ui_scaling"), @"UI scaling");
|
||||
|
||||
/// <summary>
|
||||
/// "Screen scaling"
|
||||
/// </summary>
|
||||
public static LocalisableString ScreenScaling => new TranslatableString(getKey(@"screen_scaling"), @"Screen scaling");
|
||||
|
||||
/// <summary>
|
||||
/// "Horizontal position"
|
||||
/// </summary>
|
||||
public static LocalisableString HorizontalPosition => new TranslatableString(getKey(@"horizontal_position"), @"Horizontal position");
|
||||
|
||||
/// <summary>
|
||||
/// "Vertical position"
|
||||
/// </summary>
|
||||
public static LocalisableString VerticalPosition => new TranslatableString(getKey(@"vertical_position"), @"Vertical position");
|
||||
|
||||
/// <summary>
|
||||
/// "Horizontal scale"
|
||||
/// </summary>
|
||||
public static LocalisableString HorizontalScale => new TranslatableString(getKey(@"horizontal_scale"), @"Horizontal scale");
|
||||
|
||||
/// <summary>
|
||||
/// "Vertical scale"
|
||||
/// </summary>
|
||||
public static LocalisableString VerticalScale => new TranslatableString(getKey(@"vertical_scale"), @"Vertical scale");
|
||||
|
||||
/// <summary>
|
||||
/// "Running without fullscreen mode will increase your input latency!"
|
||||
/// </summary>
|
||||
public static LocalisableString NotFullscreenNote => new TranslatableString(getKey(@"not_fullscreen_note"), @"Running without fullscreen mode will increase your input latency!");
|
||||
|
||||
/// <summary>
|
||||
/// "Detail Settings"
|
||||
/// </summary>
|
||||
public static LocalisableString DetailSettingsHeader => new TranslatableString(getKey(@"detail_settings_header"), @"Detail Settings");
|
||||
|
||||
/// <summary>
|
||||
/// "Storyboard / video"
|
||||
/// </summary>
|
||||
public static LocalisableString StoryboardVideo => new TranslatableString(getKey(@"storyboard_video"), @"Storyboard / video");
|
||||
|
||||
/// <summary>
|
||||
/// "Hit lighting"
|
||||
/// </summary>
|
||||
public static LocalisableString HitLighting => new TranslatableString(getKey(@"hit_lighting"), @"Hit lighting");
|
||||
|
||||
/// <summary>
|
||||
/// "Screenshot format"
|
||||
/// </summary>
|
||||
public static LocalisableString ScreenshotFormat => new TranslatableString(getKey(@"screenshot_format"), @"Screenshot format");
|
||||
|
||||
/// <summary>
|
||||
/// "Show menu cursor in screenshots"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowCursorInScreenshots => new TranslatableString(getKey(@"show_cursor_in_screenshots"), @"Show menu cursor in screenshots");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
59
osu.Game/Localisation/InputSettingsStrings.cs
Normal file
59
osu.Game/Localisation/InputSettingsStrings.cs
Normal file
@ -0,0 +1,59 @@
|
||||
// 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 InputSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.InputSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Input"
|
||||
/// </summary>
|
||||
public static LocalisableString InputSectionHeader => new TranslatableString(getKey(@"input_section_header"), @"Input");
|
||||
|
||||
/// <summary>
|
||||
/// "Global"
|
||||
/// </summary>
|
||||
public static LocalisableString GlobalKeyBindingHeader => new TranslatableString(getKey(@"global_key_binding_header"), @"Global");
|
||||
|
||||
/// <summary>
|
||||
/// "Song Select"
|
||||
/// </summary>
|
||||
public static LocalisableString SongSelectSection => new TranslatableString(getKey(@"song_select_section"), @"Song Select");
|
||||
|
||||
/// <summary>
|
||||
/// "In Game"
|
||||
/// </summary>
|
||||
public static LocalisableString InGameSection => new TranslatableString(getKey(@"in_game_section"), @"In Game");
|
||||
|
||||
/// <summary>
|
||||
/// "Audio"
|
||||
/// </summary>
|
||||
public static LocalisableString AudioSection => new TranslatableString(getKey(@"audio_section"), @"Audio");
|
||||
|
||||
/// <summary>
|
||||
/// "Editor"
|
||||
/// </summary>
|
||||
public static LocalisableString EditorSection => new TranslatableString(getKey(@"editor_section"), @"Editor");
|
||||
|
||||
/// <summary>
|
||||
/// "Reset all bindings in section"
|
||||
/// </summary>
|
||||
public static LocalisableString ResetSectionButton => new TranslatableString(getKey(@"reset_section_button"), @"Reset all bindings in section");
|
||||
|
||||
/// <summary>
|
||||
/// "key configuration"
|
||||
/// </summary>
|
||||
public static LocalisableString KeyBindingPanelHeader => new TranslatableString(getKey(@"key_binding_panel_header"), @"key configuration");
|
||||
|
||||
/// <summary>
|
||||
/// "Customise your keys!"
|
||||
/// </summary>
|
||||
public static LocalisableString KeyBindingPanelDescription => new TranslatableString(getKey(@"key_binding_panel_description"), @"Customise your keys!");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
74
osu.Game/Localisation/MaintenanceSettingsStrings.cs
Normal file
74
osu.Game/Localisation/MaintenanceSettingsStrings.cs
Normal file
@ -0,0 +1,74 @@
|
||||
// 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 MaintenanceSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.MaintenanceSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Maintenance"
|
||||
/// </summary>
|
||||
public static LocalisableString MaintenanceSectionHeader => new TranslatableString(getKey(@"maintenance_section_header"), @"Maintenance");
|
||||
|
||||
/// <summary>
|
||||
/// "Select directory"
|
||||
/// </summary>
|
||||
public static LocalisableString SelectDirectory => new TranslatableString(getKey(@"select_directory"), @"Select directory");
|
||||
|
||||
/// <summary>
|
||||
/// "Import beatmaps from stable"
|
||||
/// </summary>
|
||||
public static LocalisableString ImportBeatmapsFromStable => new TranslatableString(getKey(@"import_beatmaps_from_stable"), @"Import beatmaps from stable");
|
||||
|
||||
/// <summary>
|
||||
/// "Delete ALL beatmaps"
|
||||
/// </summary>
|
||||
public static LocalisableString DeleteAllBeatmaps => new TranslatableString(getKey(@"delete_all_beatmaps"), @"Delete ALL beatmaps");
|
||||
|
||||
/// <summary>
|
||||
/// "Import scores from stable"
|
||||
/// </summary>
|
||||
public static LocalisableString ImportScoresFromStable => new TranslatableString(getKey(@"import_scores_from_stable"), @"Import scores from stable");
|
||||
|
||||
/// <summary>
|
||||
/// "Delete ALL scores"
|
||||
/// </summary>
|
||||
public static LocalisableString DeleteAllScores => new TranslatableString(getKey(@"delete_all_scores"), @"Delete ALL scores");
|
||||
|
||||
/// <summary>
|
||||
/// "Import skins from stable"
|
||||
/// </summary>
|
||||
public static LocalisableString ImportSkinsFromStable => new TranslatableString(getKey(@"import_skins_from_stable"), @"Import skins from stable");
|
||||
|
||||
/// <summary>
|
||||
/// "Delete ALL skins"
|
||||
/// </summary>
|
||||
public static LocalisableString DeleteAllSkins => new TranslatableString(getKey(@"delete_all_skins"), @"Delete ALL skins");
|
||||
|
||||
/// <summary>
|
||||
/// "Import collections from stable"
|
||||
/// </summary>
|
||||
public static LocalisableString ImportCollectionsFromStable => new TranslatableString(getKey(@"import_collections_from_stable"), @"Import collections from stable");
|
||||
|
||||
/// <summary>
|
||||
/// "Delete ALL collections"
|
||||
/// </summary>
|
||||
public static LocalisableString DeleteAllCollections => new TranslatableString(getKey(@"delete_all_collections"), @"Delete ALL collections");
|
||||
|
||||
/// <summary>
|
||||
/// "Restore all hidden difficulties"
|
||||
/// </summary>
|
||||
public static LocalisableString RestoreAllHiddenDifficulties => new TranslatableString(getKey(@"restore_all_hidden_difficulties"), @"Restore all hidden difficulties");
|
||||
|
||||
/// <summary>
|
||||
/// "Restore all recently deleted beatmaps"
|
||||
/// </summary>
|
||||
public static LocalisableString RestoreAllRecentlyDeletedBeatmaps => new TranslatableString(getKey(@"restore_all_recently_deleted_beatmaps"), @"Restore all recently deleted beatmaps");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
69
osu.Game/Localisation/OnlineSettingsStrings.cs
Normal file
69
osu.Game/Localisation/OnlineSettingsStrings.cs
Normal file
@ -0,0 +1,69 @@
|
||||
// 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 OnlineSettingsStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.OnlineSettings";
|
||||
|
||||
/// <summary>
|
||||
/// "Online"
|
||||
/// </summary>
|
||||
public static LocalisableString OnlineSectionHeader => new TranslatableString(getKey(@"online_section_header"), @"Online");
|
||||
|
||||
/// <summary>
|
||||
/// "Alerts and Privacy"
|
||||
/// </summary>
|
||||
public static LocalisableString AlertsAndPrivacyHeader => new TranslatableString(getKey(@"alerts_and_privacy_header"), @"Alerts and Privacy");
|
||||
|
||||
/// <summary>
|
||||
/// "Show a notification when someone mentions your name"
|
||||
/// </summary>
|
||||
public static LocalisableString NotifyOnMentioned => new TranslatableString(getKey(@"notify_on_mentioned"), @"Show a notification when someone mentions your name");
|
||||
|
||||
/// <summary>
|
||||
/// "Show a notification when you receive a private message"
|
||||
/// </summary>
|
||||
public static LocalisableString NotifyOnPrivateMessage => new TranslatableString(getKey(@"notify_on_private_message"), @"Show a notification when you receive a private message");
|
||||
|
||||
/// <summary>
|
||||
/// "Integrations"
|
||||
/// </summary>
|
||||
public static LocalisableString IntegrationsHeader => new TranslatableString(getKey(@"integrations_header"), @"Integrations");
|
||||
|
||||
/// <summary>
|
||||
/// "Discord Rich Presence"
|
||||
/// </summary>
|
||||
public static LocalisableString DiscordRichPresence => new TranslatableString(getKey(@"discord_rich_presence"), @"Discord Rich Presence");
|
||||
|
||||
/// <summary>
|
||||
/// "Web"
|
||||
/// </summary>
|
||||
public static LocalisableString WebHeader => new TranslatableString(getKey(@"web_header"), @"Web");
|
||||
|
||||
/// <summary>
|
||||
/// "Warn about opening external links"
|
||||
/// </summary>
|
||||
public static LocalisableString ExternalLinkWarning => new TranslatableString(getKey(@"external_link_warning"), @"Warn about opening external links");
|
||||
|
||||
/// <summary>
|
||||
/// "Prefer downloads without video"
|
||||
/// </summary>
|
||||
public static LocalisableString PreferNoVideo => new TranslatableString(getKey(@"prefer_no_video"), @"Prefer downloads without video");
|
||||
|
||||
/// <summary>
|
||||
/// "Automatically download beatmaps when spectating"
|
||||
/// </summary>
|
||||
public static LocalisableString AutomaticallyDownloadWhenSpectating => new TranslatableString(getKey(@"automatically_download_when_spectating"), @"Automatically download beatmaps when spectating");
|
||||
|
||||
/// <summary>
|
||||
/// "Show explicit content in search results"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowExplicitContent => new TranslatableString(getKey(@"show_explicit_content"), @"Show explicit content in search results");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
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 GameplayCursorSize => new TranslatableString(getKey(@"gameplay_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}";
|
||||
}
|
||||
}
|
114
osu.Game/Localisation/UserInterfaceStrings.cs
Normal file
114
osu.Game/Localisation/UserInterfaceStrings.cs
Normal file
@ -0,0 +1,114 @@
|
||||
// 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 UserInterfaceStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.UserInterface";
|
||||
|
||||
/// <summary>
|
||||
/// "User Interface"
|
||||
/// </summary>
|
||||
public static LocalisableString UserInterfaceSectionHeader => new TranslatableString(getKey(@"user_interface_section_header"), @"User Interface");
|
||||
|
||||
/// <summary>
|
||||
/// "General"
|
||||
/// </summary>
|
||||
public static LocalisableString GeneralHeader => new TranslatableString(getKey(@"general_header"), @"General");
|
||||
|
||||
/// <summary>
|
||||
/// "Rotate cursor when dragging"
|
||||
/// </summary>
|
||||
public static LocalisableString CursorRotation => new TranslatableString(getKey(@"cursor_rotation"), @"Rotate cursor when dragging");
|
||||
|
||||
/// <summary>
|
||||
/// "Menu cursor size"
|
||||
/// </summary>
|
||||
public static LocalisableString MenuCursorSize => new TranslatableString(getKey(@"menu_cursor_size"), @"Menu cursor size");
|
||||
|
||||
/// <summary>
|
||||
/// "Parallax"
|
||||
/// </summary>
|
||||
public static LocalisableString Parallax => new TranslatableString(getKey(@"parallax"), @"Parallax");
|
||||
|
||||
/// <summary>
|
||||
/// "Hold-to-confirm activation time"
|
||||
/// </summary>
|
||||
public static LocalisableString HoldToConfirmActivationTime => new TranslatableString(getKey(@"hold_to_confirm_activation_time"), @"Hold-to-confirm activation time");
|
||||
|
||||
/// <summary>
|
||||
/// "Main Menu"
|
||||
/// </summary>
|
||||
public static LocalisableString MainMenuHeader => new TranslatableString(getKey(@"main_menu_header"), @"Main Menu");
|
||||
|
||||
/// <summary>
|
||||
/// "Interface voices"
|
||||
/// </summary>
|
||||
public static LocalisableString InterfaceVoices => new TranslatableString(getKey(@"interface_voices"), @"Interface voices");
|
||||
|
||||
/// <summary>
|
||||
/// "osu! music theme"
|
||||
/// </summary>
|
||||
public static LocalisableString OsuMusicTheme => new TranslatableString(getKey(@"osu_music_theme"), @"osu! music theme");
|
||||
|
||||
/// <summary>
|
||||
/// "Intro sequence"
|
||||
/// </summary>
|
||||
public static LocalisableString IntroSequence => new TranslatableString(getKey(@"intro_sequence"), @"Intro sequence");
|
||||
|
||||
/// <summary>
|
||||
/// "Background source"
|
||||
/// </summary>
|
||||
public static LocalisableString BackgroundSource => new TranslatableString(getKey(@"background_source"), @"Background source");
|
||||
|
||||
/// <summary>
|
||||
/// "Seasonal backgrounds"
|
||||
/// </summary>
|
||||
public static LocalisableString SeasonalBackgrounds => new TranslatableString(getKey(@"seasonal_backgrounds"), @"Seasonal backgrounds");
|
||||
|
||||
/// <summary>
|
||||
/// "Changes to this setting will only apply with an active osu!supporter tag."
|
||||
/// </summary>
|
||||
public static LocalisableString NotSupporterNote => new TranslatableString(getKey(@"not_supporter_note"), @"Changes to this setting will only apply with an active osu!supporter tag.");
|
||||
|
||||
/// <summary>
|
||||
/// "Song Select"
|
||||
/// </summary>
|
||||
public static LocalisableString SongSelectHeader => new TranslatableString(getKey(@"song_select_header"), @"Song Select");
|
||||
|
||||
/// <summary>
|
||||
/// "Right mouse drag to absolute scroll"
|
||||
/// </summary>
|
||||
public static LocalisableString RightMouseScroll => new TranslatableString(getKey(@"right_mouse_scroll"), @"Right mouse drag to absolute scroll");
|
||||
|
||||
/// <summary>
|
||||
/// "Show converted beatmaps"
|
||||
/// </summary>
|
||||
public static LocalisableString ShowConvertedBeatmaps => new TranslatableString(getKey(@"show_converted_beatmaps"), @"Show converted beatmaps");
|
||||
|
||||
/// <summary>
|
||||
/// "Display beatmaps from"
|
||||
/// </summary>
|
||||
public static LocalisableString StarsMinimum => new TranslatableString(getKey(@"stars_minimum"), @"Display beatmaps from");
|
||||
|
||||
/// <summary>
|
||||
/// "up to"
|
||||
/// </summary>
|
||||
public static LocalisableString StarsMaximum => new TranslatableString(getKey(@"stars_maximum"), @"up to");
|
||||
|
||||
/// <summary>
|
||||
/// "Random selection algorithm"
|
||||
/// </summary>
|
||||
public static LocalisableString RandomSelectionAlgorithm => new TranslatableString(getKey(@"random_selection_algorithm"), @"Random selection algorithm");
|
||||
|
||||
/// <summary>
|
||||
/// "no limit"
|
||||
/// </summary>
|
||||
public static LocalisableString NoLimit => new TranslatableString(getKey(@"no_limit"), @"no limit");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
@ -139,19 +139,24 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
|
||||
LoadComponentAsync(Preview = previewTrackManager.Get(beatmapSet), preview =>
|
||||
{
|
||||
// beatmapset may have changed.
|
||||
if (Preview != preview)
|
||||
return;
|
||||
// Make sure that we schedule to after the next audio frame to fix crashes in single-threaded execution.
|
||||
// See: https://github.com/ppy/osu-framework/issues/4692
|
||||
Schedule(() =>
|
||||
{
|
||||
// beatmapset may have changed.
|
||||
if (Preview != preview)
|
||||
return;
|
||||
|
||||
AddInternal(preview);
|
||||
loading = false;
|
||||
// make sure that the update of value of Playing (and the ensuing value change callbacks)
|
||||
// are marshaled back to the update thread.
|
||||
preview.Stopped += () => Schedule(() => playing.Value = false);
|
||||
AddInternal(preview);
|
||||
loading = false;
|
||||
// make sure that the update of value of Playing (and the ensuing value change callbacks)
|
||||
// are marshaled back to the update thread.
|
||||
preview.Stopped += () => Schedule(() => playing.Value = false);
|
||||
|
||||
// user may have changed their mind.
|
||||
if (playing.Value)
|
||||
attemptStart();
|
||||
// user may have changed their mind.
|
||||
if (playing.Value)
|
||||
attemptStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
|
@ -8,12 +8,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class AudioDevicesSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Devices";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.AudioDevicesHeader;
|
||||
|
||||
[Resolved]
|
||||
private AudioManager audio { get; set; }
|
||||
@ -78,7 +79,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
private class AudioDeviceDropdownControl : DropdownControl
|
||||
{
|
||||
protected override LocalisableString GenerateItemText(string item)
|
||||
=> string.IsNullOrEmpty(item) ? "Default" : base.GenerateItemText(item);
|
||||
=> string.IsNullOrEmpty(item) ? CommonStrings.Default : base.GenerateItemText(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,12 +8,13 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class OffsetSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Offset Adjustment";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.OffsetHeader;
|
||||
|
||||
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "universal", "uo", "timing" });
|
||||
|
||||
@ -24,13 +25,13 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
new SettingsSlider<double, OffsetSlider>
|
||||
{
|
||||
LabelText = "Audio offset",
|
||||
LabelText = AudioSettingsStrings.AudioOffset,
|
||||
Current = config.GetBindable<double>(OsuSetting.AudioOffset),
|
||||
KeyboardStep = 1f
|
||||
},
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Offset wizard"
|
||||
Text = AudioSettingsStrings.OffsetWizard
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -6,12 +6,13 @@ using osu.Framework.Audio;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
public class VolumeSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Volume";
|
||||
protected override LocalisableString Header => AudioSettingsStrings.VolumeHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuConfigManager config)
|
||||
@ -20,28 +21,28 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Master",
|
||||
LabelText = AudioSettingsStrings.MasterVolume,
|
||||
Current = audio.Volume,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Master (window inactive)",
|
||||
LabelText = AudioSettingsStrings.MasterVolumeInactive,
|
||||
Current = config.GetBindable<double>(OsuSetting.VolumeInactive),
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Effect",
|
||||
LabelText = AudioSettingsStrings.EffectVolume,
|
||||
Current = audio.VolumeSample,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Music",
|
||||
LabelText = AudioSettingsStrings.MusicVolume,
|
||||
Current = audio.VolumeTrack,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
|
@ -3,15 +3,17 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Audio;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class AudioSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Audio";
|
||||
public override LocalisableString Header => AudioSettingsStrings.AudioSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -6,13 +6,14 @@ using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Screens.Import;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
public class GeneralSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "General";
|
||||
protected override LocalisableString Header => DebugSettingsStrings.GeneralHeader;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig, OsuGame game)
|
||||
@ -21,18 +22,18 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show log overlay",
|
||||
LabelText = DebugSettingsStrings.ShowLogOverlay,
|
||||
Current = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowLogOverlay)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Bypass front-to-back render pass",
|
||||
LabelText = DebugSettingsStrings.BypassFrontToBackPass,
|
||||
Current = config.GetBindable<bool>(DebugSetting.BypassFrontToBackPass)
|
||||
}
|
||||
};
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = "Import files",
|
||||
Text = DebugSettingsStrings.ImportFiles,
|
||||
Action = () => game?.PerformFromScreen(menu => menu.Push(new FileImportScreen()))
|
||||
});
|
||||
}
|
||||
|
@ -6,12 +6,13 @@ using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
public class MemorySettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Memory";
|
||||
protected override LocalisableString Header => DebugSettingsStrings.MemoryHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkDebugConfigManager config, GameHost host)
|
||||
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Clear all caches",
|
||||
Text = DebugSettingsStrings.ClearAllCaches,
|
||||
Action = host.Collect
|
||||
},
|
||||
};
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Debug;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class DebugSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Debug";
|
||||
public override LocalisableString Header => DebugSettingsStrings.DebugSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -6,13 +6,14 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
public class GeneralSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "General";
|
||||
protected override LocalisableString Header => GameplaySettingsStrings.GeneralHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -21,62 +22,62 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Background dim",
|
||||
LabelText = GameplaySettingsStrings.BackgroundDim,
|
||||
Current = config.GetBindable<double>(OsuSetting.DimLevel),
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<double>
|
||||
{
|
||||
LabelText = "Background blur",
|
||||
LabelText = GameplaySettingsStrings.BackgroundBlur,
|
||||
Current = config.GetBindable<double>(OsuSetting.BlurLevel),
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Lighten playfield during breaks",
|
||||
LabelText = GameplaySettingsStrings.LightenDuringBreaks,
|
||||
Current = config.GetBindable<bool>(OsuSetting.LightenDuringBreaks)
|
||||
},
|
||||
new SettingsEnumDropdown<HUDVisibilityMode>
|
||||
{
|
||||
LabelText = "HUD overlay visibility mode",
|
||||
LabelText = GameplaySettingsStrings.HUDVisibilityMode,
|
||||
Current = config.GetBindable<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show difficulty graph on progress bar",
|
||||
LabelText = GameplaySettingsStrings.ShowDifficultyGraph,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ShowProgressGraph)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show health display even when you can't fail",
|
||||
LabelText = GameplaySettingsStrings.ShowHealthDisplayWhenCantFail,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail),
|
||||
Keywords = new[] { "hp", "bar" }
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Fade playfield to red when health is low",
|
||||
LabelText = GameplaySettingsStrings.FadePlayfieldWhenHealthLow,
|
||||
Current = config.GetBindable<bool>(OsuSetting.FadePlayfieldWhenHealthLow),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Always show key overlay",
|
||||
LabelText = GameplaySettingsStrings.AlwaysShowKeyOverlay,
|
||||
Current = config.GetBindable<bool>(OsuSetting.KeyOverlay)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Positional hitsounds",
|
||||
LabelText = GameplaySettingsStrings.PositionalHitsounds,
|
||||
Current = config.GetBindable<bool>(OsuSetting.PositionalHitSounds)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Always play first combo break sound",
|
||||
LabelText = GameplaySettingsStrings.AlwaysPlayFirstComboBreak,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AlwaysPlayFirstComboBreak)
|
||||
},
|
||||
new SettingsEnumDropdown<ScoringMode>
|
||||
{
|
||||
LabelText = "Score display mode",
|
||||
LabelText = GameplaySettingsStrings.ScoreDisplayMode,
|
||||
Current = config.GetBindable<ScoringMode>(OsuSetting.ScoreDisplayMode),
|
||||
Keywords = new[] { "scoring" }
|
||||
},
|
||||
@ -86,7 +87,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
Add(new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Disable Windows key during gameplay",
|
||||
LabelText = GameplaySettingsStrings.DisableWinKey,
|
||||
Current = config.GetBindable<bool>(OsuSetting.GameplayDisableWinKey)
|
||||
});
|
||||
}
|
||||
|
@ -6,12 +6,13 @@ using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
public class ModsSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Mods";
|
||||
protected override LocalisableString Header => GameplaySettingsStrings.ModsHeader;
|
||||
|
||||
public override IEnumerable<string> FilterTerms => base.FilterTerms.Concat(new[] { "mod" });
|
||||
|
||||
@ -22,7 +23,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Increase visibility of first object when visual impairment mods are enabled",
|
||||
LabelText = GameplaySettingsStrings.IncreaseFirstObjectVisibility,
|
||||
Current = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility),
|
||||
},
|
||||
};
|
||||
|
@ -9,12 +9,14 @@ using osu.Game.Rulesets;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class GameplaySection : SettingsSection
|
||||
{
|
||||
public override string Header => "Gameplay";
|
||||
public override LocalisableString Header => GameplaySettingsStrings.GameplaySectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
private SettingsDropdown<Language> languageSelection;
|
||||
private Bindable<string> frameworkLocale;
|
||||
|
||||
protected override LocalisableString Header => "Language";
|
||||
protected override LocalisableString Header => GeneralSettingsStrings.LanguageHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager frameworkConfig)
|
||||
@ -27,11 +27,11 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
languageSelection = new SettingsEnumDropdown<Language>
|
||||
{
|
||||
LabelText = "Language",
|
||||
LabelText = GeneralSettingsStrings.LanguageDropdown,
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Prefer metadata in original language",
|
||||
LabelText = GeneralSettingsStrings.PreferOriginalMetadataLanguage,
|
||||
Current = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowUnicode)
|
||||
},
|
||||
};
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
||||
using osu.Game.Updater;
|
||||
@ -20,7 +21,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
[Resolved(CanBeNull = true)]
|
||||
private UpdateManager updateManager { get; set; }
|
||||
|
||||
protected override LocalisableString Header => "Updates";
|
||||
protected override LocalisableString Header => GeneralSettingsStrings.UpdateHeader;
|
||||
|
||||
private SettingsButton checkForUpdatesButton;
|
||||
|
||||
@ -32,7 +33,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
Add(new SettingsEnumDropdown<ReleaseStream>
|
||||
{
|
||||
LabelText = "Release stream",
|
||||
LabelText = GeneralSettingsStrings.ReleaseStream,
|
||||
Current = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
|
||||
});
|
||||
|
||||
@ -40,7 +41,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
Add(checkForUpdatesButton = new SettingsButton
|
||||
{
|
||||
Text = "Check for updates",
|
||||
Text = GeneralSettingsStrings.CheckUpdate,
|
||||
Action = () =>
|
||||
{
|
||||
checkForUpdatesButton.Enabled.Value = false;
|
||||
@ -65,13 +66,13 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = "Open osu! folder",
|
||||
Text = GeneralSettingsStrings.OpenOsuFolder,
|
||||
Action = storage.OpenInNativeExplorer,
|
||||
});
|
||||
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = "Change folder location...",
|
||||
Text = GeneralSettingsStrings.ChangeFolderLocation,
|
||||
Action = () => game?.PerformFromScreen(menu => menu.Push(new MigrationSelectScreen()))
|
||||
});
|
||||
}
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.General;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class GeneralSection : SettingsSection
|
||||
{
|
||||
public override string Header => "General";
|
||||
public override LocalisableString Header => GeneralSettingsStrings.GeneralSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -5,12 +5,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
public class DetailSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Detail Settings";
|
||||
protected override LocalisableString Header => GraphicsSettingsStrings.DetailSettingsHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -19,22 +20,22 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Storyboard / Video",
|
||||
LabelText = GraphicsSettingsStrings.StoryboardVideo,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Hit Lighting",
|
||||
LabelText = GraphicsSettingsStrings.HitLighting,
|
||||
Current = config.GetBindable<bool>(OsuSetting.HitLighting)
|
||||
},
|
||||
new SettingsEnumDropdown<ScreenshotFormat>
|
||||
{
|
||||
LabelText = "Screenshot format",
|
||||
LabelText = GraphicsSettingsStrings.ScreenshotFormat,
|
||||
Current = config.GetBindable<ScreenshotFormat>(OsuSetting.ScreenshotFormat)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show menu cursor in screenshots",
|
||||
LabelText = GraphicsSettingsStrings.ShowCursorInScreenshots,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ScreenshotCaptureMenuCursor)
|
||||
}
|
||||
};
|
||||
|
@ -16,13 +16,14 @@ using osu.Framework.Platform;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
public class LayoutSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Layout";
|
||||
protected override LocalisableString Header => GraphicsSettingsStrings.LayoutHeader;
|
||||
|
||||
private FillFlowContainer<SettingsSlider<float>> scalingSettings;
|
||||
|
||||
@ -67,20 +68,20 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
windowModeDropdown = new SettingsDropdown<WindowMode>
|
||||
{
|
||||
LabelText = "Screen mode",
|
||||
LabelText = GraphicsSettingsStrings.ScreenMode,
|
||||
ItemSource = windowModes,
|
||||
Current = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
|
||||
},
|
||||
resolutionDropdown = new ResolutionSettingsDropdown
|
||||
{
|
||||
LabelText = "Resolution",
|
||||
LabelText = GraphicsSettingsStrings.Resolution,
|
||||
ShowsDefaultIndicator = false,
|
||||
ItemSource = resolutions,
|
||||
Current = sizeFullscreen
|
||||
},
|
||||
new SettingsSlider<float, UIScaleSlider>
|
||||
{
|
||||
LabelText = "UI Scaling",
|
||||
LabelText = GraphicsSettingsStrings.UIScaling,
|
||||
TransferValueOnCommit = true,
|
||||
Current = osuConfig.GetBindable<float>(OsuSetting.UIScale),
|
||||
KeyboardStep = 0.01f,
|
||||
@ -88,7 +89,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
},
|
||||
new SettingsEnumDropdown<ScalingMode>
|
||||
{
|
||||
LabelText = "Screen Scaling",
|
||||
LabelText = GraphicsSettingsStrings.ScreenScaling,
|
||||
Current = osuConfig.GetBindable<ScalingMode>(OsuSetting.Scaling),
|
||||
Keywords = new[] { "scale", "letterbox" },
|
||||
},
|
||||
@ -104,28 +105,28 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
LabelText = "Horizontal position",
|
||||
LabelText = GraphicsSettingsStrings.HorizontalPosition,
|
||||
Current = scalingPositionX,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
LabelText = "Vertical position",
|
||||
LabelText = GraphicsSettingsStrings.VerticalPosition,
|
||||
Current = scalingPositionY,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
LabelText = "Horizontal scale",
|
||||
LabelText = GraphicsSettingsStrings.HorizontalScale,
|
||||
Current = scalingSizeX,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
},
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
LabelText = "Vertical scale",
|
||||
LabelText = GraphicsSettingsStrings.VerticalScale,
|
||||
Current = scalingSizeY,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true
|
||||
@ -145,9 +146,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
updateResolutionDropdown();
|
||||
|
||||
const string not_fullscreen_note = "Running without fullscreen mode will increase your input latency!";
|
||||
|
||||
windowModeDropdown.WarningText = mode.NewValue != WindowMode.Fullscreen ? not_fullscreen_note : string.Empty;
|
||||
windowModeDropdown.WarningText = mode.NewValue != WindowMode.Fullscreen ? GraphicsSettingsStrings.NotFullscreenNote : default;
|
||||
}, true);
|
||||
|
||||
windowModes.BindCollectionChanged((sender, args) =>
|
||||
@ -245,7 +244,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
protected override LocalisableString GenerateItemText(Size item)
|
||||
{
|
||||
if (item == new Size(9999, 9999))
|
||||
return "Default";
|
||||
return CommonStrings.Default;
|
||||
|
||||
return $"{item.Width}x{item.Height}";
|
||||
}
|
||||
|
@ -7,12 +7,13 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
public class RendererSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Renderer";
|
||||
protected override LocalisableString Header => GraphicsSettingsStrings.RendererHeader;
|
||||
|
||||
private SettingsEnumDropdown<FrameSync> frameLimiterDropdown;
|
||||
|
||||
@ -25,17 +26,17 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
// TODO: this needs to be a custom dropdown at some point
|
||||
frameLimiterDropdown = new SettingsEnumDropdown<FrameSync>
|
||||
{
|
||||
LabelText = "Frame limiter",
|
||||
LabelText = GraphicsSettingsStrings.FrameLimiter,
|
||||
Current = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync)
|
||||
},
|
||||
new SettingsEnumDropdown<ExecutionMode>
|
||||
{
|
||||
LabelText = "Threading mode",
|
||||
LabelText = GraphicsSettingsStrings.ThreadingMode,
|
||||
Current = config.GetBindable<ExecutionMode>(FrameworkSetting.ExecutionMode)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show FPS",
|
||||
LabelText = GraphicsSettingsStrings.ShowFPS,
|
||||
Current = osuConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay)
|
||||
},
|
||||
};
|
||||
@ -47,9 +48,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
frameLimiterDropdown.Current.BindValueChanged(limit =>
|
||||
{
|
||||
const string unlimited_frames_note = "Using unlimited frame limiter can lead to stutters, bad performance and overheating. It will not improve perceived latency. \"2x refresh rate\" is recommended.";
|
||||
|
||||
frameLimiterDropdown.WarningText = limit.NewValue == FrameSync.Unlimited ? unlimited_frames_note : string.Empty;
|
||||
frameLimiterDropdown.WarningText = limit.NewValue == FrameSync.Unlimited ? GraphicsSettingsStrings.UnlimitedFramesNote : default;
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class GraphicsSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Graphics";
|
||||
public override LocalisableString Header => GraphicsSettingsStrings.GraphicsSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
Icon = FontAwesome.Solid.Globe
|
||||
};
|
||||
|
||||
public override string Header => "Global";
|
||||
public override LocalisableString Header => InputSettingsStrings.GlobalKeyBindingHeader;
|
||||
|
||||
public GlobalKeyBindingsSection(GlobalActionContainer manager)
|
||||
{
|
||||
@ -39,7 +40,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private class SongSelectKeyBindingSubsection : KeyBindingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Song Select";
|
||||
protected override LocalisableString Header => InputSettingsStrings.SongSelectSection;
|
||||
|
||||
public SongSelectKeyBindingSubsection(GlobalActionContainer manager)
|
||||
: base(null)
|
||||
@ -50,7 +51,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private class InGameKeyBindingsSubsection : KeyBindingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "In Game";
|
||||
protected override LocalisableString Header => InputSettingsStrings.InGameSection;
|
||||
|
||||
public InGameKeyBindingsSubsection(GlobalActionContainer manager)
|
||||
: base(null)
|
||||
@ -61,7 +62,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private class AudioControlKeyBindingsSubsection : KeyBindingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Audio";
|
||||
protected override LocalisableString Header => InputSettingsStrings.AudioSection;
|
||||
|
||||
public AudioControlKeyBindingsSubsection(GlobalActionContainer manager)
|
||||
: base(null)
|
||||
@ -72,7 +73,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private class EditorKeyBindingsSubsection : KeyBindingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Editor";
|
||||
protected override LocalisableString Header => InputSettingsStrings.EditorSection;
|
||||
|
||||
public EditorKeyBindingsSubsection(GlobalActionContainer manager)
|
||||
: base(null)
|
||||
|
@ -4,13 +4,14 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
public class KeyBindingPanel : SettingsSubPanel
|
||||
{
|
||||
protected override Drawable CreateHeader() => new SettingsHeader("key configuration", "Customise your keys!");
|
||||
protected override Drawable CreateHeader() => new SettingsHeader(InputSettingsStrings.KeyBindingPanelHeader, InputSettingsStrings.KeyBindingPanelDescription);
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(RulesetStore rulesets, GlobalActionContainer global)
|
||||
|
@ -20,6 +20,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Localisation;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
@ -385,7 +386,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
public CancelButton()
|
||||
{
|
||||
Text = "Cancel";
|
||||
Text = CommonStrings.Cancel;
|
||||
Size = new Vector2(80, 20);
|
||||
}
|
||||
}
|
||||
@ -394,7 +395,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
public ClearButton()
|
||||
{
|
||||
Text = "Clear";
|
||||
Text = CommonStrings.Clear;
|
||||
Size = new Vector2(80, 20);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ using osu.Game.Database;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Localisation;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
@ -64,7 +65,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Text = "Reset all bindings in section";
|
||||
Text = InputSettingsStrings.ResetSectionButton;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Width = 0.5f;
|
||||
Anchor = Anchor.TopCentre;
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
Icon = OsuIcon.Hot
|
||||
};
|
||||
|
||||
public override string Header => ruleset.Name;
|
||||
public override LocalisableString Header => ruleset.Name;
|
||||
|
||||
private readonly RulesetInfo ruleset;
|
||||
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
private readonly ITabletHandler tabletHandler;
|
||||
|
||||
private readonly Bindable<bool> enabled = new BindableBool(true);
|
||||
|
||||
private readonly Bindable<Vector2> areaOffset = new Bindable<Vector2>();
|
||||
private readonly Bindable<Vector2> areaSize = new Bindable<Vector2>();
|
||||
private readonly IBindable<TabletInfo> tablet = new Bindable<TabletInfo>();
|
||||
@ -74,7 +76,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
LabelText = CommonStrings.Enabled,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Current = tabletHandler.Enabled
|
||||
Current = enabled,
|
||||
},
|
||||
noTabletMessage = new FillFlowContainer
|
||||
{
|
||||
@ -194,6 +196,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
enabled.BindTo(tabletHandler.Enabled);
|
||||
enabled.BindValueChanged(_ => Scheduler.AddOnce(updateVisibility));
|
||||
|
||||
rotation.BindTo(tabletHandler.Rotation);
|
||||
|
||||
areaOffset.BindTo(tabletHandler.AreaOffset);
|
||||
@ -239,7 +244,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
tablet.BindTo(tabletHandler.Tablet);
|
||||
tablet.BindValueChanged(val =>
|
||||
{
|
||||
Scheduler.AddOnce(toggleVisibility);
|
||||
Scheduler.AddOnce(updateVisibility);
|
||||
|
||||
var tab = val.NewValue;
|
||||
|
||||
@ -259,19 +264,18 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
}, true);
|
||||
}
|
||||
|
||||
private void toggleVisibility()
|
||||
private void updateVisibility()
|
||||
{
|
||||
bool tabletFound = tablet.Value != null;
|
||||
|
||||
if (!tabletFound)
|
||||
{
|
||||
mainSettings.Hide();
|
||||
noTabletMessage.Show();
|
||||
return;
|
||||
}
|
||||
|
||||
mainSettings.Show();
|
||||
mainSettings.Hide();
|
||||
noTabletMessage.Hide();
|
||||
|
||||
if (!tabletHandler.Enabled.Value)
|
||||
return;
|
||||
|
||||
if (tablet.Value != null)
|
||||
mainSettings.Show();
|
||||
else
|
||||
noTabletMessage.Show();
|
||||
}
|
||||
|
||||
private void applyAspectRatio(BindableNumber<float> sizeChanged)
|
||||
|
@ -11,6 +11,7 @@ using osu.Framework.Input.Handlers.Mouse;
|
||||
using osu.Framework.Input.Handlers.Tablet;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Input;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
private readonly KeyBindingPanel keyConfig;
|
||||
|
||||
public override string Header => "Input";
|
||||
public override LocalisableString Header => InputSettingsStrings.InputSectionHeader;
|
||||
|
||||
[Resolved]
|
||||
private GameHost host { get; set; }
|
||||
@ -95,7 +96,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Enabled",
|
||||
LabelText = CommonStrings.Enabled,
|
||||
Current = handler.Enabled
|
||||
},
|
||||
};
|
||||
|
@ -14,6 +14,7 @@ using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
@ -104,7 +105,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
Origin = Anchor.Centre,
|
||||
Width = 300,
|
||||
Margin = new MarginPadding(10),
|
||||
Text = "Select directory",
|
||||
Text = MaintenanceSettingsStrings.SelectDirectory,
|
||||
Action = () => OnSelection(directorySelector.CurrentPath.Value)
|
||||
},
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Collections;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
@ -37,7 +38,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
Add(importBeatmapsButton = new SettingsButton
|
||||
{
|
||||
Text = "Import beatmaps from stable",
|
||||
Text = MaintenanceSettingsStrings.ImportBeatmapsFromStable,
|
||||
Action = () =>
|
||||
{
|
||||
importBeatmapsButton.Enabled.Value = false;
|
||||
@ -48,7 +49,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
|
||||
Add(deleteBeatmapsButton = new DangerousSettingsButton
|
||||
{
|
||||
Text = "Delete ALL beatmaps",
|
||||
Text = MaintenanceSettingsStrings.DeleteAllBeatmaps,
|
||||
Action = () =>
|
||||
{
|
||||
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() =>
|
||||
@ -63,7 +64,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
Add(importScoresButton = new SettingsButton
|
||||
{
|
||||
Text = "Import scores from stable",
|
||||
Text = MaintenanceSettingsStrings.ImportScoresFromStable,
|
||||
Action = () =>
|
||||
{
|
||||
importScoresButton.Enabled.Value = false;
|
||||
@ -74,7 +75,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
|
||||
Add(deleteScoresButton = new DangerousSettingsButton
|
||||
{
|
||||
Text = "Delete ALL scores",
|
||||
Text = MaintenanceSettingsStrings.DeleteAllScores,
|
||||
Action = () =>
|
||||
{
|
||||
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() =>
|
||||
@ -89,7 +90,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
Add(importSkinsButton = new SettingsButton
|
||||
{
|
||||
Text = "Import skins from stable",
|
||||
Text = MaintenanceSettingsStrings.ImportSkinsFromStable,
|
||||
Action = () =>
|
||||
{
|
||||
importSkinsButton.Enabled.Value = false;
|
||||
@ -100,7 +101,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
|
||||
Add(deleteSkinsButton = new DangerousSettingsButton
|
||||
{
|
||||
Text = "Delete ALL skins",
|
||||
Text = MaintenanceSettingsStrings.DeleteAllSkins,
|
||||
Action = () =>
|
||||
{
|
||||
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() =>
|
||||
@ -117,7 +118,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
Add(importCollectionsButton = new SettingsButton
|
||||
{
|
||||
Text = "Import collections from stable",
|
||||
Text = MaintenanceSettingsStrings.ImportCollectionsFromStable,
|
||||
Action = () =>
|
||||
{
|
||||
importCollectionsButton.Enabled.Value = false;
|
||||
@ -128,7 +129,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
|
||||
Add(new DangerousSettingsButton
|
||||
{
|
||||
Text = "Delete ALL collections",
|
||||
Text = MaintenanceSettingsStrings.DeleteAllCollections,
|
||||
Action = () =>
|
||||
{
|
||||
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(collectionManager.DeleteAll));
|
||||
@ -140,7 +141,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
restoreButton = new SettingsButton
|
||||
{
|
||||
Text = "Restore all hidden difficulties",
|
||||
Text = MaintenanceSettingsStrings.RestoreAllHiddenDifficulties,
|
||||
Action = () =>
|
||||
{
|
||||
restoreButton.Enabled.Value = false;
|
||||
@ -153,7 +154,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
},
|
||||
undeleteButton = new SettingsButton
|
||||
{
|
||||
Text = "Restore all recently deleted beatmaps",
|
||||
Text = MaintenanceSettingsStrings.RestoreAllRecentlyDeletedBeatmaps,
|
||||
Action = () =>
|
||||
{
|
||||
undeleteButton.Enabled.Value = false;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Maintenance;
|
||||
using osuTK;
|
||||
|
||||
@ -10,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class MaintenanceSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Maintenance";
|
||||
public override LocalisableString Header => MaintenanceSettingsStrings.MaintenanceSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -5,12 +5,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
public class AlertsAndPrivacySettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Alerts and Privacy";
|
||||
protected override LocalisableString Header => OnlineSettingsStrings.AlertsAndPrivacyHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -19,12 +20,12 @@ namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show a notification when someone mentions your name",
|
||||
LabelText = OnlineSettingsStrings.NotifyOnMentioned,
|
||||
Current = config.GetBindable<bool>(OsuSetting.NotifyOnUsernameMentioned)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show a notification when you receive a private message",
|
||||
LabelText = OnlineSettingsStrings.NotifyOnPrivateMessage,
|
||||
Current = config.GetBindable<bool>(OsuSetting.NotifyOnPrivateMessage)
|
||||
},
|
||||
};
|
||||
|
@ -5,12 +5,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
public class IntegrationSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Integrations";
|
||||
protected override LocalisableString Header => OnlineSettingsStrings.IntegrationsHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
new SettingsEnumDropdown<DiscordRichPresenceMode>
|
||||
{
|
||||
LabelText = "Discord Rich Presence",
|
||||
LabelText = OnlineSettingsStrings.DiscordRichPresence,
|
||||
Current = config.GetBindable<DiscordRichPresenceMode>(OsuSetting.DiscordRichPresence)
|
||||
}
|
||||
};
|
||||
|
@ -5,12 +5,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
public class WebSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Web";
|
||||
protected override LocalisableString Header => OnlineSettingsStrings.WebHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -19,24 +20,24 @@ namespace osu.Game.Overlays.Settings.Sections.Online
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Warn about opening external links",
|
||||
LabelText = OnlineSettingsStrings.ExternalLinkWarning,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ExternalLinkWarning)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Prefer downloads without video",
|
||||
LabelText = OnlineSettingsStrings.PreferNoVideo,
|
||||
Keywords = new[] { "no-video" },
|
||||
Current = config.GetBindable<bool>(OsuSetting.PreferNoVideo)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Automatically download beatmaps when spectating",
|
||||
LabelText = OnlineSettingsStrings.AutomaticallyDownloadWhenSpectating,
|
||||
Keywords = new[] { "spectator" },
|
||||
Current = config.GetBindable<bool>(OsuSetting.AutomaticallyDownloadWhenSpectating),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show explicit content in search results",
|
||||
LabelText = OnlineSettingsStrings.ShowExplicitContent,
|
||||
Keywords = new[] { "nsfw", "18+", "offensive" },
|
||||
Current = config.GetBindable<bool>(OsuSetting.ShowOnlineExplicitContent),
|
||||
}
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.Online;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class OnlineSection : SettingsSection
|
||||
{
|
||||
public override string Header => "Online";
|
||||
public override LocalisableString Header => OnlineSettingsStrings.OnlineSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ using osu.Framework.Localisation;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Skinning.Editor;
|
||||
using osuTK;
|
||||
@ -23,7 +24,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
private SkinSettingsDropdown skinDropdown;
|
||||
|
||||
public override string Header => "Skin";
|
||||
public override LocalisableString Header => SkinSettingsStrings.SkinSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
@ -69,34 +70,34 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
skinDropdown = new SkinSettingsDropdown(),
|
||||
new SettingsButton
|
||||
{
|
||||
Text = "Skin layout editor",
|
||||
Text = SkinSettingsStrings.SkinLayoutEditor,
|
||||
Action = () => skinEditor?.Toggle(),
|
||||
},
|
||||
new ExportSkinButton(),
|
||||
new SettingsSlider<float, SizeSlider>
|
||||
{
|
||||
LabelText = "Gameplay cursor size",
|
||||
LabelText = SkinSettingsStrings.GameplayCursorSize,
|
||||
Current = config.GetBindable<float>(OsuSetting.GameplayCursorSize),
|
||||
KeyboardStep = 0.01f
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Adjust gameplay cursor size based on current beatmap",
|
||||
LabelText = SkinSettingsStrings.AutoCursorSize,
|
||||
Current = config.GetBindable<bool>(OsuSetting.AutoCursorSize)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Beatmap skins",
|
||||
LabelText = SkinSettingsStrings.BeatmapSkins,
|
||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Beatmap colours",
|
||||
LabelText = SkinSettingsStrings.BeatmapColours,
|
||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapColours)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Beatmap hitsounds",
|
||||
LabelText = SkinSettingsStrings.BeatmapHitsounds,
|
||||
Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds)
|
||||
},
|
||||
};
|
||||
@ -200,7 +201,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Text = "Export selected skin";
|
||||
Text = SkinSettingsStrings.ExportSkinButton;
|
||||
Action = export;
|
||||
|
||||
currentSkin = skins.CurrentSkin.GetBoundCopy();
|
||||
|
@ -6,12 +6,13 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
public class GeneralSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "General";
|
||||
protected override LocalisableString Header => UserInterfaceStrings.GeneralHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -20,23 +21,23 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Rotate cursor when dragging",
|
||||
LabelText = UserInterfaceStrings.CursorRotation,
|
||||
Current = config.GetBindable<bool>(OsuSetting.CursorRotation)
|
||||
},
|
||||
new SettingsSlider<float, SizeSlider>
|
||||
{
|
||||
LabelText = "Menu cursor size",
|
||||
LabelText = UserInterfaceStrings.MenuCursorSize,
|
||||
Current = config.GetBindable<float>(OsuSetting.MenuCursorSize),
|
||||
KeyboardStep = 0.01f
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Parallax",
|
||||
LabelText = UserInterfaceStrings.Parallax,
|
||||
Current = config.GetBindable<bool>(OsuSetting.MenuParallax)
|
||||
},
|
||||
new SettingsSlider<float, TimeSlider>
|
||||
{
|
||||
LabelText = "Hold-to-confirm activation time",
|
||||
LabelText = UserInterfaceStrings.HoldToConfirmActivationTime,
|
||||
Current = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay),
|
||||
KeyboardStep = 50
|
||||
},
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Users;
|
||||
|
||||
@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
public class MainMenuSettings : SettingsSubsection
|
||||
{
|
||||
protected override LocalisableString Header => "Main Menu";
|
||||
protected override LocalisableString Header => UserInterfaceStrings.MainMenuHeader;
|
||||
|
||||
private IBindable<User> user;
|
||||
|
||||
@ -28,27 +29,27 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Interface voices",
|
||||
LabelText = UserInterfaceStrings.InterfaceVoices,
|
||||
Current = config.GetBindable<bool>(OsuSetting.MenuVoice)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "osu! music theme",
|
||||
LabelText = UserInterfaceStrings.OsuMusicTheme,
|
||||
Current = config.GetBindable<bool>(OsuSetting.MenuMusic)
|
||||
},
|
||||
new SettingsEnumDropdown<IntroSequence>
|
||||
{
|
||||
LabelText = "Intro sequence",
|
||||
LabelText = UserInterfaceStrings.IntroSequence,
|
||||
Current = config.GetBindable<IntroSequence>(OsuSetting.IntroSequence),
|
||||
},
|
||||
backgroundSourceDropdown = new SettingsEnumDropdown<BackgroundSource>
|
||||
{
|
||||
LabelText = "Background source",
|
||||
LabelText = UserInterfaceStrings.BackgroundSource,
|
||||
Current = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource),
|
||||
},
|
||||
new SettingsEnumDropdown<SeasonalBackgroundMode>
|
||||
{
|
||||
LabelText = "Seasonal backgrounds",
|
||||
LabelText = UserInterfaceStrings.SeasonalBackgrounds,
|
||||
Current = config.GetBindable<SeasonalBackgroundMode>(OsuSetting.SeasonalBackgroundMode),
|
||||
}
|
||||
};
|
||||
@ -60,9 +61,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
|
||||
user.BindValueChanged(u =>
|
||||
{
|
||||
const string not_supporter_note = "Changes to this setting will only apply with an active osu!supporter tag.";
|
||||
|
||||
backgroundSourceDropdown.WarningText = u.NewValue?.IsSupporter != true ? not_supporter_note : string.Empty;
|
||||
backgroundSourceDropdown.WarningText = u.NewValue?.IsSupporter != true ? UserInterfaceStrings.NotSupporterNote : default;
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
private Bindable<double> minStars;
|
||||
private Bindable<double> maxStars;
|
||||
|
||||
protected override LocalisableString Header => "Song Select";
|
||||
protected override LocalisableString Header => UserInterfaceStrings.SongSelectHeader;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
@ -31,31 +32,31 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Right mouse drag to absolute scroll",
|
||||
LabelText = UserInterfaceStrings.RightMouseScroll,
|
||||
Current = config.GetBindable<bool>(OsuSetting.SongSelectRightMouseScroll),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Show converted beatmaps",
|
||||
LabelText = UserInterfaceStrings.ShowConvertedBeatmaps,
|
||||
Current = config.GetBindable<bool>(OsuSetting.ShowConvertedBeatmaps),
|
||||
},
|
||||
new SettingsSlider<double, StarsSlider>
|
||||
{
|
||||
LabelText = "Display beatmaps from",
|
||||
LabelText = UserInterfaceStrings.StarsMinimum,
|
||||
Current = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum),
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "minimum", "maximum", "star", "difficulty" }
|
||||
},
|
||||
new SettingsSlider<double, MaximumStarsSlider>
|
||||
{
|
||||
LabelText = "up to",
|
||||
LabelText = UserInterfaceStrings.StarsMaximum,
|
||||
Current = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||
KeyboardStep = 0.1f,
|
||||
Keywords = new[] { "minimum", "maximum", "star", "difficulty" }
|
||||
},
|
||||
new SettingsEnumDropdown<RandomSelectAlgorithm>
|
||||
{
|
||||
LabelText = "Random selection algorithm",
|
||||
LabelText = UserInterfaceStrings.RandomSelectionAlgorithm,
|
||||
Current = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm),
|
||||
}
|
||||
};
|
||||
@ -63,7 +64,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
|
||||
|
||||
private class MaximumStarsSlider : StarsSlider
|
||||
{
|
||||
public override LocalisableString TooltipText => Current.IsDefault ? "no limit" : base.TooltipText;
|
||||
public override LocalisableString TooltipText => Current.IsDefault ? UserInterfaceStrings.NoLimit : base.TooltipText;
|
||||
}
|
||||
|
||||
private class StarsSlider : OsuSliderBar<double>
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays.Settings.Sections.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
public class UserInterfaceSection : SettingsSection
|
||||
{
|
||||
public override string Header => "User Interface";
|
||||
public override LocalisableString Header => UserInterfaceStrings.UserInterfaceSectionHeader;
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK.Graphics;
|
||||
@ -19,10 +20,10 @@ namespace osu.Game.Overlays.Settings
|
||||
protected override Container<Drawable> Content => FlowContent;
|
||||
|
||||
public abstract Drawable CreateIcon();
|
||||
public abstract string Header { get; }
|
||||
public abstract LocalisableString Header { get; }
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public virtual IEnumerable<string> FilterTerms => new[] { Header };
|
||||
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
||||
|
||||
private const int header_size = 26;
|
||||
private const int margin = 20;
|
||||
|
@ -24,6 +24,11 @@ namespace osu.Game.Overlays.Settings
|
||||
protected abstract LocalisableString Header { get; }
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
|
||||
// FilterTerms should contains both original string and localised string for user to search.
|
||||
// Since LocalisableString is unable to get original string at this time (2021-08-14),
|
||||
// only call .ToString() to use localised one.
|
||||
// TODO: Update here when FilterTerms accept LocalisableString.
|
||||
public virtual IEnumerable<string> FilterTerms => new[] { Header.ToString() };
|
||||
|
||||
public bool MatchingFilter
|
||||
|
@ -91,7 +91,13 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
// This is required as SettingsItem relies heavily on this bindable for internal use.
|
||||
// The actual update flow is done via the bindable provided in the constructor.
|
||||
public Bindable<float?> Current { get; set; } = new Bindable<float?>();
|
||||
private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>();
|
||||
|
||||
public Bindable<float?> Current
|
||||
{
|
||||
get => current.Current;
|
||||
set => current.Current = value;
|
||||
}
|
||||
|
||||
public SliderControl(BindableNumber<float> currentNumber)
|
||||
{
|
||||
|
@ -304,6 +304,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AABB/@EntryIndexedValue">AABB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=API/@EntryIndexedValue">API</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BPM/@EntryIndexedValue">BPM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FPS/@EntryIndexedValue">FPS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GC/@EntryIndexedValue">GC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GL/@EntryIndexedValue">GL</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GLSL/@EntryIndexedValue">GLSL</s:String>
|
||||
|
Loading…
Reference in New Issue
Block a user