2021-01-07 05:35:15 +00:00
|
|
|
// 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.Input.Bindings;
|
|
|
|
using osu.Game.Database;
|
|
|
|
using Realms;
|
|
|
|
|
|
|
|
namespace osu.Game.Input.Bindings
|
|
|
|
{
|
|
|
|
[MapTo("KeyBinding")]
|
|
|
|
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey
|
|
|
|
{
|
2021-01-07 06:41:58 +00:00
|
|
|
public string ID { get; set; }
|
2021-01-07 05:35:15 +00:00
|
|
|
|
|
|
|
public int? RulesetID { get; set; }
|
|
|
|
|
|
|
|
public int? Variant { get; set; }
|
|
|
|
|
2021-01-07 07:53:36 +00:00
|
|
|
public int Action { get; set; }
|
|
|
|
|
|
|
|
public string KeyCombination { get; set; }
|
|
|
|
|
2021-01-07 05:35:15 +00:00
|
|
|
[Ignored]
|
|
|
|
public KeyBinding KeyBinding
|
|
|
|
{
|
2021-01-07 07:53:36 +00:00
|
|
|
get => new KeyBinding(KeyCombination, Action);
|
|
|
|
set
|
2021-01-07 05:35:15 +00:00
|
|
|
{
|
2021-01-07 07:53:36 +00:00
|
|
|
KeyCombination = value.KeyCombination.ToString();
|
|
|
|
Action = (int)value.Action;
|
2021-01-07 05:35:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|