2018-01-05 19:21:19 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-08-12 21:10:57 +08:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2017-10-05 03:52:12 +08:00
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2017-08-11 15:11:46 +08:00
|
|
|
using osu.Framework.Input.Bindings;
|
2017-10-25 17:59:15 +08:00
|
|
|
using osu.Game.Database;
|
2017-08-11 15:11:46 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Input.Bindings
|
|
|
|
{
|
|
|
|
[Table("KeyBinding")]
|
2017-10-25 17:59:15 +08:00
|
|
|
public class DatabasedKeyBinding : KeyBinding, IHasPrimaryKey
|
2017-08-11 15:11:46 +08:00
|
|
|
{
|
2017-10-06 05:23:26 +08:00
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
2017-10-14 13:28:25 +08:00
|
|
|
public int ID { get; set; }
|
2017-08-14 21:31:23 +08:00
|
|
|
|
2017-10-14 13:28:25 +08:00
|
|
|
public int? RulesetID { get; set; }
|
2017-08-11 15:11:46 +08:00
|
|
|
|
|
|
|
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")]
|
2017-08-16 16:27:09 +08:00
|
|
|
public int IntAction
|
2017-08-11 15:11:46 +08:00
|
|
|
{
|
2017-08-16 16:27:09 +08:00
|
|
|
get { return (int)Action; }
|
|
|
|
set { Action = value; }
|
2017-08-11 15:11:46 +08:00
|
|
|
}
|
|
|
|
}
|
2017-10-05 03:52:12 +08:00
|
|
|
}
|