Inputs_OpenVIII.cs 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Microsoft.Xna.Framework.Input;
  2. using OpenVIII.Encoding.Tags;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace OpenVIII
  6. {
  7. [Serializable]
  8. public class Inputs_OpenVIII : Inputs
  9. {
  10. #region Constructors
  11. public Inputs_OpenVIII() => Data = new Dictionary<List<FF8TextTagKey>, List<InputButton>>
  12. {
  13. { InputActions.EscapeLeft , new List<InputButton>{ new InputButton { Key = Keys.Home } } },
  14. { InputActions.EscapeRight, new List<InputButton>{new InputButton { Key = Keys.End }} },
  15. { InputActions.RotateLeft, new List<InputButton>{new InputButton { Key = Keys.PageUp }} },
  16. { InputActions.RotateRight, new List<InputButton>{new InputButton { Key = Keys.PageDown }} },
  17. { InputActions.Cancel, new List<InputButton>{
  18. new InputButton { Key = Keys.Back },
  19. new InputButton { MouseButton = MouseButtons.RightButton }
  20. }},
  21. { InputActions.Menu, new List<InputButton>{new InputButton { Key = Keys.M }} },
  22. { InputActions.Confirm, new List<InputButton>{
  23. new InputButton { Key = Keys.Enter },
  24. new InputButton { MouseButton = MouseButtons.LeftButton, Trigger = ButtonTrigger.MouseOver | ButtonTrigger.OnPress }
  25. }},
  26. { InputActions.Cards, new List<InputButton>{new InputButton { Key = Keys.Space }} },
  27. { InputActions.Select, new List<InputButton>{new InputButton { Key = Keys.Tab }} },
  28. { InputActions.Pause, new List<InputButton>{new InputButton { Key = Keys.Pause }} },
  29. { InputActions.Up, new List<InputButton>{
  30. new InputButton { Key = Keys.Up, Trigger = ButtonTrigger.Press },
  31. new InputButton { Key = Keys.W, Trigger = ButtonTrigger.Press },
  32. }},
  33. { InputActions.Down, new List<InputButton>{
  34. new InputButton { Key = Keys.Down, Trigger = ButtonTrigger.Press },
  35. new InputButton { Key = Keys.S, Trigger = ButtonTrigger.Press },
  36. }},
  37. { InputActions.Left, new List<InputButton>{
  38. new InputButton { Key = Keys.Left, Trigger = ButtonTrigger.Press },
  39. new InputButton { Key = Keys.A, Trigger = ButtonTrigger.Press },
  40. new InputButton { MouseButton = MouseButtons.MouseWheelup, Trigger = ButtonTrigger.MouseOver | ButtonTrigger.OnPress | ButtonTrigger.Scrolling },
  41. }},
  42. { InputActions.Right, new List<InputButton>{
  43. new InputButton { Key = Keys.Right, Trigger = ButtonTrigger.Press },
  44. new InputButton { Key = Keys.D, Trigger = ButtonTrigger.Press },
  45. new InputButton { MouseButton = MouseButtons.MouseWheeldown, Trigger = ButtonTrigger.MouseOver | ButtonTrigger.OnPress | ButtonTrigger.Scrolling },
  46. }},
  47. { InputActions.ExitMenu, new List<InputButton>{new InputButton { Key = Keys.Escape }} },
  48. { InputActions.Reset, new List<InputButton>{new InputButton { Key = Keys.R, Combo = new List<InputButton>{ new InputButton { Key = Keys.LeftControl } }} } },
  49. { InputActions.Exit, new List<InputButton>{new InputButton { Key = Keys.Q, Combo = new List<InputButton>{new InputButton { Key = Keys.LeftControl } } } } },
  50. };
  51. #endregion Constructors
  52. #region Properties
  53. public override Dictionary<List<FF8TextTagKey>, List<InputButton>> Data
  54. {
  55. get;
  56. protected set;
  57. }
  58. public override bool DrawGamePadButtons => false;
  59. #endregion Properties
  60. }
  61. }