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.

75 lines
2.3 KiB

1 year ago
1 year ago
1 year ago
  1. import { i18n, setting } from "./hotbar-expansion.js";
  2. export const registerSettings = function () {
  3. let modulename = "monks-hotbar-expansion";
  4. const updateClass = () => {
  5. $('#hotbar .hotbar-page')
  6. .toggleClass('reverse', setting('reverse-row-order'))
  7. .toggleClass('hidefirst', setting('hide-first-row'));
  8. }
  9. game.settings.register(modulename, "number-rows", {
  10. name: i18n("MonksHotbarExpansion.number-rows.name"),
  11. hint: i18n("MonksHotbarExpansion.number-rows.hint"),
  12. scope: "client",
  13. config: true,
  14. default: 5,
  15. type: Number,
  16. range: {
  17. min: 2,
  18. max: 5,
  19. step: 1
  20. },
  21. requiresReload: true
  22. });
  23. game.settings.register(modulename, "reverse-row-order", {
  24. name: i18n("MonksHotbarExpansion.reverse-row-order.name"),
  25. hint: i18n("MonksHotbarExpansion.reverse-row-order.hint"),
  26. scope: "client",
  27. config: true,
  28. default: false,
  29. type: Boolean,
  30. onChange: updateClass
  31. });
  32. game.settings.register(modulename, "hide-first-row", {
  33. name: i18n("MonksHotbarExpansion.hide-first-row.name"),
  34. hint: i18n("MonksHotbarExpansion.hide-first-row.hint"),
  35. scope: "client",
  36. config: true,
  37. default: false,
  38. type: Boolean,
  39. onChange: updateClass
  40. });
  41. game.settings.register(modulename, "collapse-on-open", {
  42. name: i18n("MonksHotbarExpansion.collapse-on-open.name"),
  43. hint: i18n("MonksHotbarExpansion.collapse-on-open.hint"),
  44. scope: "client",
  45. config: true,
  46. default: true,
  47. type: Boolean
  48. });
  49. game.settings.register(modulename, "collapse-on-select", {
  50. name: i18n("MonksHotbarExpansion.collapse-on-select.name"),
  51. hint: i18n("MonksHotbarExpansion.collapse-on-select.hint"),
  52. scope: "client",
  53. config: true,
  54. default: true,
  55. type: Boolean
  56. });
  57. game.settings.register(modulename, "hide-page-arrows", {
  58. name: i18n("MonksHotbarExpansion.hide-page-arrows.name"),
  59. hint: i18n("MonksHotbarExpansion.hide-page-arrows.hint"),
  60. scope: "client",
  61. config: true,
  62. default: false,
  63. type: Boolean,
  64. requiresReload: true
  65. });
  66. };