Exemple #1
0
 protected virtual void initialize_buttons()
 {
     dir = new DirectionalButtons();
     action = new VERGEActions();
     ButtonInputSet set;
     dir = new DirectionalButtons();
     set = new ButtonInputSet();
     set.keys.Add(Keys.Left);
     set.gamepad_buttons.Add(Buttons.DPadLeft);
     set.gamepad_buttons.Add(Buttons.LeftThumbstickLeft);
     dir.left = input.register_semantic_button("Left", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.Right);
     set.gamepad_buttons.Add(Buttons.DPadRight);
     set.gamepad_buttons.Add(Buttons.LeftThumbstickRight);
     dir.right = input.register_semantic_button("Right", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.Up);
     set.gamepad_buttons.Add(Buttons.DPadUp);
     set.gamepad_buttons.Add(Buttons.LeftThumbstickUp);
     dir.up = input.register_semantic_button("Up", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.Down);
     set.gamepad_buttons.Add(Buttons.DPadDown);
     set.gamepad_buttons.Add(Buttons.LeftThumbstickDown);
     dir.down = input.register_semantic_button("Down", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.Enter);
     set.keys.Add(Keys.Z);
     set.keys.Add(Keys.Space);
     set.gamepad_buttons.Add(Buttons.A);
     action.confirm = input.register_semantic_button("Confirm", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.LeftAlt);
     set.keys.Add(Keys.RightAlt);
     set.keys.Add(Keys.X);
     set.gamepad_buttons.Add(Buttons.B);
     action.cancel = input.register_semantic_button("Cancel", set);
     set = new ButtonInputSet();
     set.keys.Add(Keys.Escape);
     set.gamepad_buttons.Add(Buttons.Y);
     action.menu = input.register_semantic_button("Menu", set);
 }
Exemple #2
0
 public void HandleInput( DirectionalButtons dir, VERGEActions action )
 {
     this.activeMenu.OnControlUpdate( dir, action );
 }