mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Code review fixes
This commit is contained in:
@ -21,7 +21,7 @@ namespace osu.Game.Input.Bindings
|
||||
|
||||
private KeyBindingStore store;
|
||||
|
||||
public override IEnumerable<KeyBinding> DefaultMappings => ruleset.CreateInstance().GetDefaultKeyBindings();
|
||||
public override IEnumerable<KeyBinding> DefaultKeyBindings => ruleset.CreateInstance().GetDefaultKeyBindings();
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance.
|
||||
|
@ -11,17 +11,17 @@ using osu.Framework.Input.Bindings;
|
||||
|
||||
namespace osu.Game.Input.Bindings
|
||||
{
|
||||
public class GlobalBindingInputManager : DatabasedKeyBindingInputManager<GlobalAction>
|
||||
public class GlobalKeyBindingInputManager : DatabasedKeyBindingInputManager<GlobalAction>
|
||||
{
|
||||
private readonly Drawable handler;
|
||||
|
||||
public GlobalBindingInputManager(OsuGameBase game)
|
||||
public GlobalKeyBindingInputManager(OsuGameBase game)
|
||||
{
|
||||
if (game is IKeyBindingHandler<GlobalAction>)
|
||||
handler = game;
|
||||
}
|
||||
|
||||
public override IEnumerable<KeyBinding> DefaultMappings => new[]
|
||||
public override IEnumerable<KeyBinding> DefaultKeyBindings => new[]
|
||||
{
|
||||
new KeyBinding(Key.F8, GlobalAction.ToggleChat),
|
||||
new KeyBinding(Key.F9, GlobalAction.ToggleSocial),
|
@ -26,7 +26,7 @@ namespace osu.Game.Input
|
||||
}
|
||||
}
|
||||
|
||||
public void Register(KeyBindingInputManager manager) => insertDefaults(manager.DefaultMappings);
|
||||
public void Register(KeyBindingInputManager manager) => insertDefaults(manager.DefaultKeyBindings);
|
||||
|
||||
protected override int StoreVersion => 3;
|
||||
|
||||
@ -51,9 +51,7 @@ namespace osu.Game.Input
|
||||
protected override void Prepare(bool reset = false)
|
||||
{
|
||||
if (reset)
|
||||
{
|
||||
Connection.DropTable<DatabasedKeyBinding>();
|
||||
}
|
||||
|
||||
Connection.CreateTable<DatabasedKeyBinding>();
|
||||
}
|
||||
@ -90,9 +88,6 @@ namespace osu.Game.Input
|
||||
public IEnumerable<KeyBinding> Query(int? rulesetId = null, int? variant = null) =>
|
||||
Query<DatabasedKeyBinding>(b => b.RulesetID == rulesetId && b.Variant == variant);
|
||||
|
||||
public void Update(KeyBinding keyBinding)
|
||||
{
|
||||
Connection.Update(keyBinding);
|
||||
}
|
||||
public void Update(KeyBinding keyBinding) => Connection.Update(keyBinding);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user