mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Rename realm persisted properties to avoid casting necessity
This commit is contained in:
@ -7,7 +7,7 @@ using Realms;
|
||||
|
||||
namespace osu.Game.Input.Bindings
|
||||
{
|
||||
[MapTo("KeyBinding")]
|
||||
[MapTo(nameof(KeyBinding))]
|
||||
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey, IKeyBinding
|
||||
{
|
||||
[PrimaryKey]
|
||||
@ -17,20 +17,22 @@ namespace osu.Game.Input.Bindings
|
||||
|
||||
public int? Variant { get; set; }
|
||||
|
||||
KeyCombination IKeyBinding.KeyCombination
|
||||
public KeyCombination KeyCombination
|
||||
{
|
||||
get => KeyCombination;
|
||||
set => KeyCombination = value.ToString();
|
||||
get => KeyCombinationString;
|
||||
set => KeyCombinationString = value.ToString();
|
||||
}
|
||||
|
||||
object IKeyBinding.Action
|
||||
public object Action
|
||||
{
|
||||
get => Action;
|
||||
set => Action = (int)value;
|
||||
get => ActionInt;
|
||||
set => ActionInt = (int)value;
|
||||
}
|
||||
|
||||
public int Action { get; set; }
|
||||
[MapTo(nameof(Action))]
|
||||
public int ActionInt { get; set; }
|
||||
|
||||
public string KeyCombination { get; set; }
|
||||
[MapTo(nameof(KeyCombination))]
|
||||
public string KeyCombinationString { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user