smrendererv3/SMOptionals/SM.Game/Controls/GameKeybindList.cs
2021-03-17 17:09:59 +01:00

24 lines
No EOL
703 B
C#

using System;
using System.Collections.Generic;
namespace SM.Game.Controls
{
public class GameKeybindList : List<KeyValuePair<string, GameKeybind>>
{
public void Add(string name, GameKeybind keybind)
{
Add(new KeyValuePair<string, GameKeybind>(name, keybind));
}
public void Add(string name, Func<GameKeybindContext, object> keyboard = null,
Func<GameKeybindContext, object> controller = null)
{
Add(new KeyValuePair<string, GameKeybind>(name, new GameKeybind()
{
AI = null,
Controller = controller,
Keyboard = keyboard
}));
}
}
}