1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 03:52:57 +08:00
osu-lazer/osu.Game/Input/Bindings/DatabasedKeyBinding.cs

35 lines
965 B
C#
Raw Normal View History

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-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-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
}