mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge branch 'master' into open-profile-hotkey
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
@ -15,8 +13,9 @@ namespace osu.Game.Input.Bindings
|
||||
{
|
||||
public class GlobalActionContainer : DatabasedKeyBindingContainer<GlobalAction>, IHandleGlobalKeyboardInput
|
||||
{
|
||||
private readonly Drawable handler;
|
||||
private InputManager parentInputManager;
|
||||
private readonly Drawable? handler;
|
||||
|
||||
private InputManager? parentInputManager;
|
||||
|
||||
public GlobalActionContainer(OsuGameBase game)
|
||||
: base(matchingMode: KeyCombinationMatchingMode.Modifiers)
|
||||
@ -32,7 +31,10 @@ namespace osu.Game.Input.Bindings
|
||||
parentInputManager = GetContainingInputManager();
|
||||
}
|
||||
|
||||
// IMPORTANT: Do not change the order of key bindings in this list.
|
||||
// It is used to decide the order of precedence (see note in DatabasedKeyBindingContainer).
|
||||
public override IEnumerable<IKeyBinding> DefaultKeyBindings => GlobalKeyBindings
|
||||
.Concat(OverlayKeyBindings)
|
||||
.Concat(EditorKeyBindings)
|
||||
.Concat(InGameKeyBindings)
|
||||
.Concat(SongSelectKeyBindings)
|
||||
@ -40,26 +42,6 @@ namespace osu.Game.Input.Bindings
|
||||
|
||||
public IEnumerable<KeyBinding> GlobalKeyBindings => new[]
|
||||
{
|
||||
new KeyBinding(InputKey.F6, GlobalAction.ToggleNowPlaying),
|
||||
new KeyBinding(InputKey.F8, GlobalAction.ToggleChat),
|
||||
new KeyBinding(InputKey.F9, GlobalAction.ToggleSocial),
|
||||
new KeyBinding(InputKey.F10, GlobalAction.ToggleGameplayMouseButtons),
|
||||
new KeyBinding(InputKey.F12, GlobalAction.TakeScreenshot),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.F }, GlobalAction.ToggleFPSDisplay),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Alt, InputKey.R }, GlobalAction.ResetInputSettings),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.T }, GlobalAction.ToggleToolbar),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.O }, GlobalAction.ToggleSettings),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.D }, GlobalAction.ToggleBeatmapListing),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.N }, GlobalAction.ToggleNotifications),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.P }, GlobalAction.ToggleProfile),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.S }, GlobalAction.ToggleSkinEditor),
|
||||
|
||||
new KeyBinding(InputKey.Escape, GlobalAction.Back),
|
||||
new KeyBinding(InputKey.ExtraMouseButton1, GlobalAction.Back),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.Home }, GlobalAction.Home),
|
||||
|
||||
new KeyBinding(InputKey.Up, GlobalAction.SelectPrevious),
|
||||
new KeyBinding(InputKey.Down, GlobalAction.SelectNext),
|
||||
|
||||
@ -70,7 +52,32 @@ namespace osu.Game.Input.Bindings
|
||||
new KeyBinding(InputKey.Enter, GlobalAction.Select),
|
||||
new KeyBinding(InputKey.KeypadEnter, GlobalAction.Select),
|
||||
|
||||
new KeyBinding(InputKey.Escape, GlobalAction.Back),
|
||||
new KeyBinding(InputKey.ExtraMouseButton1, GlobalAction.Back),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Alt, InputKey.Home }, GlobalAction.Home),
|
||||
|
||||
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),
|
||||
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.R }, GlobalAction.RandomSkin),
|
||||
|
||||
new KeyBinding(InputKey.F10, GlobalAction.ToggleGameplayMouseButtons),
|
||||
new KeyBinding(InputKey.F12, GlobalAction.TakeScreenshot),
|
||||
};
|
||||
|
||||
public IEnumerable<KeyBinding> OverlayKeyBindings => new[]
|
||||
{
|
||||
new KeyBinding(InputKey.F8, GlobalAction.ToggleChat),
|
||||
new KeyBinding(InputKey.F6, GlobalAction.ToggleNowPlaying),
|
||||
new KeyBinding(InputKey.F9, GlobalAction.ToggleSocial),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.D }, GlobalAction.ToggleBeatmapListing),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.O }, GlobalAction.ToggleSettings),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.N }, GlobalAction.ToggleNotifications),
|
||||
};
|
||||
|
||||
public IEnumerable<KeyBinding> EditorKeyBindings => new[]
|
||||
|
@ -3,8 +3,9 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.ComponentModel;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Input
|
||||
{
|
||||
@ -17,18 +18,20 @@ namespace osu.Game.Input
|
||||
/// <summary>
|
||||
/// The mouse cursor will be free to move outside the game window.
|
||||
/// </summary>
|
||||
[LocalisableDescription(typeof(MouseSettingsStrings), nameof(MouseSettingsStrings.NeverConfine))]
|
||||
Never,
|
||||
|
||||
/// <summary>
|
||||
/// The mouse cursor will be locked to the window bounds during gameplay,
|
||||
/// but may otherwise move freely.
|
||||
/// </summary>
|
||||
[Description("During Gameplay")]
|
||||
[LocalisableDescription(typeof(MouseSettingsStrings), nameof(MouseSettingsStrings.ConfineDuringGameplay))]
|
||||
DuringGameplay,
|
||||
|
||||
/// <summary>
|
||||
/// The mouse cursor will always be locked to the window bounds while the game has focus.
|
||||
/// </summary>
|
||||
[LocalisableDescription(typeof(MouseSettingsStrings), nameof(MouseSettingsStrings.AlwaysConfine))]
|
||||
Always
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user