Ejemplo n.º 1
0
        public void AddInputPanel(InputActionDelegate action)
        {
            FrameworkElement panel = GameManager.instance.GetResource <FrameworkElement>("DialogInput");

            AddContent(panel);

            inputBox          = WaywardEngine.Utilities.FindNode <TextBox>(panel, "InputBox");
            inputBox.KeyDown += (sender, e) => {
                if (e.Key != Key.Return)
                {
                    return;
                }

                action(inputBox.Text);
                CloseAction();
            };
        }
Ejemplo n.º 2
0
 public void AddAction(InputActionType inputActionType, InputActionDelegate inputAction)
 {
     _actions.Add(inputActionType, inputAction);
 }
Ejemplo n.º 3
0
 public void RegisterKeyPressed(Key key, InputActionDelegate action)
 {
     GetInputAction(key).KeyPressed += action; ;
 }
Ejemplo n.º 4
0
 public void RegisterKeyUp(Key key, InputActionDelegate action)
 {
     GetInputAction(key).KeyUp += action;
 }
Ejemplo n.º 5
0
 public void RegisterKeyDown(Key key, InputActionDelegate action)
 {
     GetInputAction(key).KeyDown += action; ;
 }