mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 22:13:20 +08:00
Merge branch 'master' into schedule-display-without-current
This commit is contained in:
commit
7fabdbc504
@ -303,6 +303,15 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
Match.LosersProgression.Value = null;
|
Match.LosersProgression.Value = null;
|
||||||
|
|
||||||
ladderInfo.Matches.Remove(Match);
|
ladderInfo.Matches.Remove(Match);
|
||||||
|
|
||||||
|
foreach (var m in ladderInfo.Matches)
|
||||||
|
{
|
||||||
|
if (m.Progression.Value == Match)
|
||||||
|
m.Progression.Value = null;
|
||||||
|
|
||||||
|
if (m.LosersProgression.Value == Match)
|
||||||
|
m.LosersProgression.Value = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
29
osu.Game/Localisation/BindingSettingsStrings.cs
Normal file
29
osu.Game/Localisation/BindingSettingsStrings.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// 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 BindingSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.BindingSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Shortcut and gameplay bindings"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ShortcutAndGameplayBindings => new TranslatableString(getKey(@"shortcut_and_gameplay_bindings"), @"Shortcut and gameplay bindings");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Configure"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Configure => new TranslatableString(getKey(@"configure"), @"Configure");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "change global shortcut keys and gameplay bindings"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ChangeBindingsButton => new TranslatableString(getKey(@"change_bindings_button"), @"change global shortcut keys and gameplay bindings");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,21 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Cancel => new TranslatableString(getKey(@"cancel"), @"Cancel");
|
public static LocalisableString Cancel => new TranslatableString(getKey(@"cancel"), @"Cancel");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Enabled"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Enabled => new TranslatableString(getKey(@"enabled"), @"Enabled");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Width"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Width => new TranslatableString(getKey(@"width"), @"Width");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Height"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Height => new TranslatableString(getKey(@"height"), @"Height");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
59
osu.Game/Localisation/TabletSettingsStrings.cs
Normal file
59
osu.Game/Localisation/TabletSettingsStrings.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 TabletSettingsStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.TabletSettings";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Tablet"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Tablet => new TranslatableString(getKey(@"tablet"), @"Tablet");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "No tablet detected!"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString NoTabletDetected => new TranslatableString(getKey(@"no_tablet_detected"), @"No tablet detected!");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Reset to full area"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ResetToFullArea => new TranslatableString(getKey(@"reset_to_full_area"), @"Reset to full area");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Conform to current game aspect ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ConformToCurrentGameAspectRatio => new TranslatableString(getKey(@"conform_to_current_game_aspect_ratio"), @"Conform to current game aspect ratio");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "X Offset"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString XOffset => new TranslatableString(getKey(@"x_offset"), @"X Offset");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Y Offset"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString YOffset => new TranslatableString(getKey(@"y_offset"), @"Y Offset");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Rotation"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString Rotation => new TranslatableString(getKey(@"rotation"), @"Rotation");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Aspect Ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString AspectRatio => new TranslatableString(getKey(@"aspect_ratio"), @"Aspect Ratio");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Lock aspect ratio"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString LockAspectRatio => new TranslatableString(getKey(@"lock_aspect_ratio"), @"Lock aspect ratio");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -3,12 +3,13 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
public class BindingSettings : SettingsSubsection
|
public class BindingSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override LocalisableString Header => "Shortcut and gameplay bindings";
|
protected override LocalisableString Header => BindingSettingsStrings.ShortcutAndGameplayBindings;
|
||||||
|
|
||||||
public BindingSettings(KeyBindingPanel keyConfig)
|
public BindingSettings(KeyBindingPanel keyConfig)
|
||||||
{
|
{
|
||||||
@ -16,8 +17,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Configure",
|
Text = BindingSettingsStrings.Configure,
|
||||||
TooltipText = "change global shortcut keys and gameplay bindings",
|
TooltipText = BindingSettingsStrings.ChangeBindingsButton,
|
||||||
Action = keyConfig.ToggleVisibility
|
Action = keyConfig.ToggleVisibility
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = height,
|
Height = height,
|
||||||
Width = 0.25f,
|
Width = 0.25f,
|
||||||
Text = $"{presetRotation}º",
|
Text = $@"{presetRotation}º",
|
||||||
Action = () => tabletHandler.Rotation.Value = presetRotation,
|
Action = () => tabletHandler.Rotation.Value = presetRotation,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Platform;
|
|||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Input
|
namespace osu.Game.Overlays.Settings.Sections.Input
|
||||||
{
|
{
|
||||||
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
|
|
||||||
private OsuSpriteText noTabletMessage;
|
private OsuSpriteText noTabletMessage;
|
||||||
|
|
||||||
protected override LocalisableString Header => "Tablet";
|
protected override LocalisableString Header => TabletSettingsStrings.Tablet;
|
||||||
|
|
||||||
public TabletSettings(ITabletHandler tabletHandler)
|
public TabletSettings(ITabletHandler tabletHandler)
|
||||||
{
|
{
|
||||||
@ -67,14 +68,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Enabled",
|
LabelText = CommonStrings.Enabled,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Current = tabletHandler.Enabled
|
Current = tabletHandler.Enabled
|
||||||
},
|
},
|
||||||
noTabletMessage = new OsuSpriteText
|
noTabletMessage = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "No tablet detected!",
|
Text = TabletSettingsStrings.NoTabletDetected,
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
|
Padding = new MarginPadding { Horizontal = SettingsPanel.CONTENT_MARGINS }
|
||||||
@ -95,7 +96,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
},
|
},
|
||||||
new DangerousSettingsButton
|
new DangerousSettingsButton
|
||||||
{
|
{
|
||||||
Text = "Reset to full area",
|
Text = TabletSettingsStrings.ResetToFullArea,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
aspectLock.Value = false;
|
aspectLock.Value = false;
|
||||||
@ -106,7 +107,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
},
|
},
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Conform to current game aspect ratio",
|
Text = TabletSettingsStrings.ConformToCurrentGameAspectRatio,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
forceAspectRatio((float)host.Window.ClientSize.Width / host.Window.ClientSize.Height);
|
forceAspectRatio((float)host.Window.ClientSize.Width / host.Window.ClientSize.Height);
|
||||||
@ -115,43 +116,43 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "X Offset",
|
LabelText = TabletSettingsStrings.XOffset,
|
||||||
Current = offsetX
|
Current = offsetX
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Y Offset",
|
LabelText = TabletSettingsStrings.YOffset,
|
||||||
Current = offsetY
|
Current = offsetY
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Rotation",
|
LabelText = TabletSettingsStrings.Rotation,
|
||||||
Current = rotation
|
Current = rotation
|
||||||
},
|
},
|
||||||
new RotationPresetButtons(tabletHandler),
|
new RotationPresetButtons(tabletHandler),
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Aspect Ratio",
|
LabelText = TabletSettingsStrings.AspectRatio,
|
||||||
Current = aspectRatio
|
Current = aspectRatio
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Lock aspect ratio",
|
LabelText = TabletSettingsStrings.LockAspectRatio,
|
||||||
Current = aspectLock
|
Current = aspectLock
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Width",
|
LabelText = CommonStrings.Width,
|
||||||
Current = sizeX
|
Current = sizeX
|
||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
TransferValueOnCommit = true,
|
TransferValueOnCommit = true,
|
||||||
LabelText = "Height",
|
LabelText = CommonStrings.Height,
|
||||||
Current = sizeY
|
Current = sizeY
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.706.0">
|
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.716.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
Loading…
Reference in New Issue
Block a user