1
+ import { CustomHotbarSettingsForm } from './custom-hotbar-settings-form.js' ;
2
+ import { CoreHotbarSettingsForm } from './core-hotbar-settings-form.js' ;
3
+
4
+ export class CustomHotbarSettings {
5
+
6
+ static register ( ) {
7
+ //EXPERIMENTAL ATTEMPT AT SUBMENU
8
+ game . settings . registerMenu ( "custom-hotbar" , 'chbSettingsMenu' , {
9
+ name : 'Custom Hotbar Settings' ,
10
+ label : 'Custom Hotbar' ,
11
+ icon : 'fas fa-bars' ,
12
+ type : CustomHotbarSettingsForm ,
13
+ restricted : true
14
+ } ) ;
15
+
16
+ game . settings . registerMenu ( "custom-hotbar" , 'coreSettingsMenu' , {
17
+ name : 'Core Foundry Hotbar Modification Settings' ,
18
+ label : 'Core Hotbar' ,
19
+ icon : 'fas fa-minus' ,
20
+ type : CoreHotbarSettingsForm ,
21
+ restricted : true
22
+ } ) ;
23
+
24
+
25
+ //CUSTOM HOTBAR SETTINGS
26
+
27
+ // module key options
28
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "chbPrimaryColor" , {
29
+ name : "customHotbar.settings.chbPrimaryColor.name" , // The name of the setting in the settings menu
30
+ hint : "customHotbar.settings.chbPrimaryColor.nameHint" , // A description of the registered setting and its behavior
31
+ label : "Color Picker" , // The text label used in the button
32
+ restricted : false , // Restrict this setting to gamemaster only?
33
+ defaultColor : "#0000FF80" , // The default color of the setting
34
+ scope : "client" , // The scope of the setting
35
+ onChange : ( value ) => { ui . customHotbar . render ( ) ; } // A callback function which triggers when the setting is changed
36
+ } )
37
+
38
+ // module key options
39
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "chbBorderColor" , {
40
+ name : "customHotbar.settings.chbBorderColor.name" , // The name of the setting in the settings menu
41
+ hint : "customHotbar.settings.chbBorderColor.nameHint" , // A description of the registered setting and its behavior
42
+ label : "Color Picker" , // The text label used in the button
43
+ restricted : false , // Restrict this setting to gamemaster only?
44
+ defaultColor : "#0000FFff" , // The default color of the setting
45
+ scope : "client" , // The scope of the setting
46
+ onChange : ( value ) => { ui . customHotbar . render ( ) ; } // A callback function which triggers when the setting is changed
47
+ } )
48
+
49
+ // module key options
50
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "chbBorderColorActive" , {
51
+ name : "customHotbar.settings.chbBorderColorActive.name" , // The name of the setting in the settings menu
52
+ hint : "customHotbar.settings.chbBorderColorActive.nameHint" , // A description of the registered setting and its behavior
53
+ label : "Color Picker" , // The text label used in the button
54
+ restricted : false , // Restrict this setting to gamemaster only?
55
+ defaultColor : "#FFFFFFff" , // The default color of the setting
56
+ scope : "client" , // The scope of the setting
57
+ onChange : ( value ) => { ui . customHotbar . render ( ) ; } // A callback function which triggers when the setting is changed
58
+ } )
59
+
60
+ // module key options
61
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "chbBorderColorInactive" , {
62
+ name : "customHotbar.settings.chbBorderColorInactive.name" , // The name of the setting in the settings menu
63
+ hint : "customHotbar.settings.chbBorderColorInactive.nameHint" , // A description of the registered setting and its behavior
64
+ label : "Color Picker" , // The text label used in the button
65
+ restricted : false , // Restrict this setting to gamemaster only?
66
+ defaultColor : "#939799ff" , // The default color of the setting
67
+ scope : "client" , // The scope of the setting
68
+ onChange : ( value ) => { ui . customHotbar . render ( ) ; } // A callback function which triggers when the setting is changed
69
+ } )
70
+
71
+ game . settings . register ( "custom-hotbar" , "chbXPos" , {
72
+ name : "customHotbar.settings.chbXPos.name" ,
73
+ hint : "customHotbar.settings.chbXPos.nameHint" ,
74
+ scope : "world" ,
75
+ config : true ,
76
+ default : "220" ,
77
+ type : Number ,
78
+ //choices: {
79
+ //"default": "customHotbar.Settings.chbColor.value.default",
80
+ //"onlyCurrent": "customHotbar.Settings.chbColor.value.onlyCurrent",
81
+ //"no": "ForienQuestLog.Settings.showTasks.no"
82
+ //},
83
+ onChange : value => {
84
+ ui . customHotbar . render ( ) ;
85
+ }
86
+ } ) ;
87
+
88
+ game . settings . register ( "custom-hotbar" , "chbYPos" , {
89
+ name : "customHotbar.settings.chbYPos.name" ,
90
+ hint : "customHotbar.settings.chbYPos.nameHint" ,
91
+ scope : "world" ,
92
+ config : true ,
93
+ default : "63" ,
94
+ type : Number ,
95
+ //choices: {
96
+ //"default": "customHotbar.Settings.chbColor.value.default",
97
+ //"onlyCurrent": "customHotbar.Settings.chbColor.value.onlyCurrent",
98
+ //"no": "ForienQuestLog.Settings.showTasks.no"
99
+ //},
100
+ onChange : value => {
101
+ ui . customHotbar . render ( ) ;
102
+ }
103
+ } ) ;
104
+
105
+ //Add ZPos set to uneditable?
106
+
107
+ //CORE HOTBAR SETTINGS
108
+ // module key options
109
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "corePrimaryColor" , {
110
+ name : "customHotbar.settings.corePrimaryColor.name" , // The name of the setting in the settings menu
111
+ hint : "customHotbar.settings.corePrimaryColor.nameHint" , // A description of the registered setting and its behavior
112
+ label : "Color Picker" , // The text label used in the button
113
+ restricted : false , // Restrict this setting to gamemaster only?
114
+ defaultColor : "#00000080" , // The default color of the setting
115
+ scope : "client" , // The scope of the setting
116
+ onChange : ( value ) => { ui . hotbar . render ( ) ; } // A callback function which triggers when the setting is changed
117
+ } )
118
+
119
+ // module key options
120
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "coreBorderColor" , {
121
+ name : "customHotbar.settings.coreBorderColor.name" , // The name of the setting in the settings menu
122
+ hint : "customHotbar.settings.coreBorderColor.nameHint" , // A description of the registered setting and its behavior
123
+ label : "Color Picker" , // The text label used in the button
124
+ restricted : false , // Restrict this setting to gamemaster only?
125
+ defaultColor : "#000000ff" , // The default color of the setting
126
+ scope : "client" , // The scope of the setting
127
+ onChange : ( value ) => { ui . hotbar . render ( ) ; } // A callback function which triggers when the setting is changed
128
+ } )
129
+
130
+ // module key options
131
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "coreBorderColorActive" , {
132
+ name : "customHotbar.settings.coreBorderColorActive.name" , // The name of the setting in the settings menu
133
+ hint : "customHotbar.settings.coreBorderColorActive.nameHint" , // A description of the registered setting and its behavior
134
+ label : "Color Picker" , // The text label used in the button
135
+ restricted : false , // Restrict this setting to gamemaster only?
136
+ defaultColor : "#ff6400" , // The default color of the setting
137
+ scope : "client" , // The scope of the setting
138
+ onChange : ( value ) => { ui . hotbar . render ( ) ; } // A callback function which triggers when the setting is changed
139
+ } )
140
+
141
+ // module key options
142
+ new window . Ardittristan . ColorSetting ( "custom-hotbar" , "coreBorderColorInactive" , {
143
+ name : "customHotbar.settings.coreBorderColorInactive.name" , // The name of the setting in the settings menu
144
+ hint : "customHotbar.settings.coreBorderColorInactive.nameHint" , // A description of the registered setting and its behavior
145
+ label : "Color Picker" , // The text label used in the button
146
+ restricted : false , // Restrict this setting to gamemaster only?
147
+ defaultColor : "#939799ff" , // The default color of the setting
148
+ scope : "client" , // The scope of the setting
149
+ onChange : ( value ) => { ui . hotbar . render ( ) ; } // A callback function which triggers when the setting is changed
150
+ } )
151
+
152
+ game . settings . register ( "custom-hotbar" , "coreXPos" , {
153
+ name : "customHotbar.settings.coreXPos.name" ,
154
+ hint : "customHotbar.settings.coreXPos.nameHint" ,
155
+ scope : "world" ,
156
+ config : true ,
157
+ default : "220" ,
158
+ type : Number ,
159
+ /*choices: {
160
+ "default": "customHotbar.Settings.chbColor.value.default",
161
+ "onlyCurrent": "customHotbar.Settings.chbColor.value.onlyCurrent",
162
+ "no": "ForienQuestLog.Settings.showTasks.no"
163
+ }, */
164
+ onChange : value => {
165
+ ui . hotbar . render ( ) ;
166
+ }
167
+ } ) ;
168
+
169
+ game . settings . register ( "custom-hotbar" , "coreYPos" , {
170
+ name : "customHotbar.settings.coreYPos.name" ,
171
+ hint : "customHotbar.settings.coreYPos.nameHint" ,
172
+ scope : "world" ,
173
+ config : true ,
174
+ default : "10" ,
175
+ type : Number ,
176
+ /*choices: {
177
+ "default": "customHotbar.Settings.chbColor.value.default",
178
+ "onlyCurrent": "customHotbar.Settings.chbColor.value.onlyCurrent",
179
+ "no": "ForienQuestLog.Settings.showTasks.no"
180
+ }, */
181
+ onChange : value => {
182
+ ui . hotbar . render ( ) ;
183
+ }
184
+ } ) ;
185
+ }
186
+ }
0 commit comments