2017-08-12 13:10:57 +00: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-10-04 19:52:12 +00:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2017-08-11 07:11:46 +00:00
|
|
|
using osu.Framework.Input.Bindings;
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
|
|
|
namespace osu.Game.Input.Bindings
|
|
|
|
{
|
|
|
|
[Table("KeyBinding")]
|
|
|
|
public class DatabasedKeyBinding : KeyBinding
|
|
|
|
{
|
2017-10-04 19:52:12 +00:00
|
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
|
|
public int Id { get; set; }
|
2017-08-14 13:31:23 +00:00
|
|
|
|
2017-10-04 19:52:12 +00:00
|
|
|
[ForeignKey(nameof(RulesetInfo))]
|
|
|
|
public int? RulesetInfoId { get; set; }
|
|
|
|
public RulesetInfo RulesetInfo;
|
2017-08-11 07:11:46 +00:00
|
|
|
|
|
|
|
public int? Variant { get; set; }
|
|
|
|
|
|
|
|
[Column("Keys")]
|
|
|
|
public string KeysString
|
|
|
|
{
|
2017-08-12 13:10:57 +00:00
|
|
|
get { return KeyCombination.ToString(); }
|
|
|
|
private set { KeyCombination = value; }
|
2017-08-11 07:11:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Column("Action")]
|
2017-08-16 08:27:09 +00:00
|
|
|
public int IntAction
|
2017-08-11 07:11:46 +00:00
|
|
|
{
|
2017-08-16 08:27:09 +00:00
|
|
|
get { return (int)Action; }
|
|
|
|
set { Action = value; }
|
2017-08-11 07:11:46 +00:00
|
|
|
}
|
|
|
|
}
|
2017-10-04 19:52:12 +00:00
|
|
|
}
|