Exemplo n.º 1
0
        internal static bool TryParse(string[] values, out ControlBinding binding)
        {
            List <Keys>      keys    = new List <Keys>(values.Length);
            List <Ds4Button> buttons = new List <Ds4Button>(values.Length);

            foreach (var keyString in values)
            {
                if (Enum.TryParse(keyString, out Keys key))
                {
                    keys.Add(key);
                }
                else if (Enum.TryParse(keyString, out Ds4Button button))
                {
                    buttons.Add(button);
                }
            }

            binding = new ControlBinding(keys.ToArray(), buttons.ToArray());

            return(true);
        }
Exemplo n.º 2
0
 public static bool IsAnyTapped(ControlBinding binding) => binding.IsAnyTapped();
Exemplo n.º 3
0
 public static bool IsAnyReleased(ControlBinding binding) => binding.IsAnyReleased();
Exemplo n.º 4
0
 public static bool IsAnyDown(ControlBinding binding) => binding.IsAnyDown();