17.01.2021
+ WPF-Support + Game Controller System + GameKeybind System + SM_WPF_TEST
This commit is contained in:
parent
af90d617d3
commit
6f23a80f7f
60 changed files with 1536 additions and 143 deletions
26
SMOptionals/SM.Game/Controls/GameKeybindList.cs
Normal file
26
SMOptionals/SM.Game/Controls/GameKeybindList.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using OpenTK.Input;
|
||||
|
||||
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
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue