mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
Merge pull request #19657 from novialriptide/open-profile-hotkey
Add keybind for showing profile
This commit is contained in:
commit
9148305fd8
@ -60,6 +60,7 @@ namespace osu.Game.Input.Bindings
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.F }, GlobalAction.ToggleFPSDisplay),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.T }, GlobalAction.ToggleToolbar),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.S }, GlobalAction.ToggleSkinEditor),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.P }, GlobalAction.ToggleProfile),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Alt, InputKey.R }, GlobalAction.ResetInputSettings),
|
||||
|
||||
@ -339,5 +340,8 @@ namespace osu.Game.Input.Bindings
|
||||
|
||||
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleFPSCounter))]
|
||||
ToggleFPSDisplay,
|
||||
|
||||
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleProfile))]
|
||||
ToggleProfile,
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +149,11 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString ToggleNotifications => new TranslatableString(getKey(@"toggle_notifications"), @"Toggle notifications");
|
||||
|
||||
/// <summary>
|
||||
/// "Toggle profile"
|
||||
/// </summary>
|
||||
public static LocalisableString ToggleProfile => new TranslatableString(getKey(@"toggle_profile"), @"Toggle profile");
|
||||
|
||||
/// <summary>
|
||||
/// "Pause gameplay"
|
||||
/// </summary>
|
||||
|
@ -1138,6 +1138,13 @@ namespace osu.Game
|
||||
mouseDisableButtons.Value = !mouseDisableButtons.Value;
|
||||
return true;
|
||||
|
||||
case GlobalAction.ToggleProfile:
|
||||
if (userProfile.State.Value == Visibility.Visible)
|
||||
userProfile.Hide();
|
||||
else
|
||||
ShowUser(API.LocalUser.Value);
|
||||
return true;
|
||||
|
||||
case GlobalAction.RandomSkin:
|
||||
// Don't allow random skin selection while in the skin editor.
|
||||
// This is mainly to stop many "osu! default (modified)" skins being created via the SkinManager.EnsureMutableSkin() path.
|
||||
|
Loading…
Reference in New Issue
Block a user