Use IKeyBinding for all key binding usages (and add update flow via primary key)

This commit is contained in:
Dean Herbert
2021-01-08 15:49:01 +09:00
parent a77519c6bd
commit 8765aaf9e6
11 changed files with 72 additions and 52 deletions

View File

@ -8,14 +8,27 @@ using Realms;
namespace osu.Game.Input.Bindings
{
[MapTo("KeyBinding")]
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey, IKeyBinding
{
[PrimaryKey]
public string ID { get; set; }
public int? RulesetID { get; set; }
public int? Variant { get; set; }
KeyCombination IKeyBinding.KeyCombination
{
get => KeyCombination;
set => KeyCombination = value.ToString();
}
object IKeyBinding.Action
{
get => Action;
set => Action = (int)value;
}
public int Action { get; set; }
public string KeyCombination { get; set; }