2017-08-12 21:10:57 +08:00
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2017-08-11 15:11:46 +08:00
|
|
|
using osu.Framework.Input.Bindings;
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
using SQLite.Net.Attributes;
|
|
|
|
using SQLiteNetExtensions.Attributes;
|
|
|
|
|
|
|
|
namespace osu.Game.Input.Bindings
|
|
|
|
{
|
|
|
|
[Table("KeyBinding")]
|
|
|
|
public class DatabasedKeyBinding : KeyBinding
|
|
|
|
{
|
|
|
|
[ForeignKey(typeof(RulesetInfo))]
|
|
|
|
public int? RulesetID { get; set; }
|
|
|
|
|
|
|
|
[Indexed]
|
|
|
|
public int? Variant { get; set; }
|
|
|
|
|
|
|
|
[Column("Keys")]
|
|
|
|
public string KeysString
|
|
|
|
{
|
2017-08-12 21:10:57 +08:00
|
|
|
get { return KeyCombination.ToString(); }
|
|
|
|
private set { KeyCombination = value; }
|
2017-08-11 15:11:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
[Column("Action")]
|
|
|
|
public new int Action
|
|
|
|
{
|
2017-08-14 19:19:25 +08:00
|
|
|
get { return (int)base.Action; }
|
2017-08-11 15:11:46 +08:00
|
|
|
private set { base.Action = value; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|