All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
4.2 KiB

  1. import { SettingsMenuDorakoUX } from "./menu.js";
  2. export class MovingSettings extends SettingsMenuDorakoUX {
  3. static namespace = "moving";
  4. static SETTINGS = [
  5. "restructure-card-info",
  6. "chat-merge",
  7. "adjust-chat-controls",
  8. "compact-ui",
  9. "minimize-hotbar",
  10. "center-hotbar",
  11. "adjust-token-effects-hud",
  12. "animate-messages",
  13. "controls-alignment",
  14. ];
  15. rerenderChatMessages() {}
  16. static get settings() {
  17. return {
  18. "chat-merge": {
  19. name: "pf2e-dorako-ux.settings.chat-merge.name",
  20. hint: "pf2e-dorako-ux.settings.chat-merge.hint",
  21. scope: "client",
  22. type: Boolean,
  23. default: false,
  24. config: true,
  25. requiresReload: true,
  26. onChange: (value) => {},
  27. },
  28. "adjust-chat-controls": {
  29. name: "pf2e-dorako-ux.settings.adjust-chat-controls.name",
  30. hint: "pf2e-dorako-ux.settings.adjust-chat-controls.hint",
  31. scope: "client",
  32. type: Boolean,
  33. default: true,
  34. config: true,
  35. requiresReload: true,
  36. onChange: (value) => {},
  37. },
  38. "center-hotbar": {
  39. name: "pf2e-dorako-ux.settings.center-hotbar.name",
  40. hint: "pf2e-dorako-ux.settings.center-hotbar.hint",
  41. scope: "client",
  42. type: Boolean,
  43. default: false,
  44. config: true,
  45. requiresReload: false,
  46. onChange: (value) => {
  47. if (value) {
  48. document.getElementById("ui-bottom").classList.add("centered");
  49. } else {
  50. document.getElementById("ui-bottom").classList.remove("centered");
  51. }
  52. },
  53. },
  54. "controls-alignment": {
  55. name: "pf2e-dorako-ux.settings.controls-alignment.name",
  56. hint: "pf2e-dorako-ux.settings.controls-alignment.hint",
  57. scope: "client",
  58. type: String,
  59. default: "start",
  60. choices: {
  61. start: "pf2e-dorako-ux.settings.controls-alignment.choice.start",
  62. center: "pf2e-dorako-ux.settings.controls-alignment.choice.center",
  63. end: "pf2e-dorako-ux.settings.controls-alignment.choice.end",
  64. },
  65. config: true,
  66. requiresReload: false,
  67. onChange: (value) => {
  68. const root = document.querySelector(":root").style;
  69. root.setProperty("--controls-alignment", value);
  70. },
  71. },
  72. "adjust-token-effects-hud": {
  73. name: "pf2e-dorako-ux.settings.adjust-token-effects-hud.name",
  74. hint: "pf2e-dorako-ux.settings.adjust-token-effects-hud.hint",
  75. scope: "world",
  76. type: Boolean,
  77. default: true,
  78. config: true,
  79. requiresReload: true,
  80. },
  81. "restructure-card-info": {
  82. name: "pf2e-dorako-ux.settings.restructure-card-info.name",
  83. hint: "pf2e-dorako-ux.settings.restructure-card-info.hint",
  84. scope: "world",
  85. type: Boolean,
  86. default: true,
  87. config: true,
  88. requiresReload: false,
  89. onChange: () => {
  90. const messages = game.messages.filter((m) => m instanceof ChatMessage);
  91. for (const message of messages) {
  92. ui.chat.updateMessage(message);
  93. }
  94. },
  95. },
  96. "animate-messages": {
  97. name: "pf2e-dorako-ux.settings.animate-messages.name",
  98. hint: "pf2e-dorako-ux.settings.animate-messages.hint",
  99. scope: "world",
  100. type: Boolean,
  101. default: false,
  102. config: true,
  103. requiresReload: false,
  104. onChange: () => {
  105. const messages = game.messages.filter((m) => m instanceof ChatMessage);
  106. for (const message of messages) {
  107. ui.chat.updateMessage(message);
  108. }
  109. },
  110. },
  111. "compact-ui": {
  112. name: "pf2e-dorako-ux.settings.compact-ui.name",
  113. hint: "pf2e-dorako-ux.settings.compact-ui.hint",
  114. scope: "client",
  115. config: true,
  116. default: false,
  117. type: Boolean,
  118. requiresReload: true,
  119. onChange: (value) => {},
  120. },
  121. "minimize-hotbar": {
  122. name: "pf2e-dorako-ux.settings.minimize-hotbar.name",
  123. hint: "pf2e-dorako-ux.settings.minimize-hotbar.hint",
  124. scope: "client",
  125. config: true,
  126. default: false,
  127. type: Boolean,
  128. requiresReload: true,
  129. onChange: (value) => {},
  130. },
  131. };
  132. }
  133. }