osu/osu.Game/Input/Bindings/DatabasedKeyBinding.cs

35 lines
965 B
C#
Raw Normal View History

2018-01-05 11:21:19 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-08-12 13:10:57 +00:00
// 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.Schema;
2017-08-11 07:11:46 +00:00
using osu.Framework.Input.Bindings;
2017-10-25 09:59:15 +00:00
using osu.Game.Database;
2017-08-11 07:11:46 +00:00
namespace osu.Game.Input.Bindings
{
[Table("KeyBinding")]
2017-10-25 09:59:15 +00:00
public class DatabasedKeyBinding : KeyBinding, IHasPrimaryKey
2017-08-11 07:11:46 +00:00
{
2017-10-05 21:23:26 +00:00
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
2017-10-14 05:28:25 +00:00
public int ID { get; set; }
2017-10-14 05:28:25 +00:00
public int? RulesetID { get; set; }
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
}