forked from gcolgate/Foundry-VTT-Image-Hover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.js
98 lines (92 loc) · 4.99 KB
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
export class Settings {
static createSettings() {
// Game master setting
game.settings.register("image-hover", "permissionOnHover", {
name: "Required actor permission", // Setting name
hint: "Required permission level of Actor to see handout.", // Setting description
scope: "world", // Global setting
config: true, // Show setting in configuration view
restricted: true, // Game master only
choices: { // Choices
"0": "None",
"1": "Limited",
"2": "Observer",
"3": "Owner"
},
default: "0", // Default value
type: Number // Value type
});
// Game master setting
game.settings.register("image-hover", "artType", {
name: "Art on hover", // Setting name
hint: "The type of art shown on hover", // Setting description
scope: "world", // Global setting
config: true, // Show setting in configuration view
restricted: true, // Game master only
choices: { // Choices
"character": "Character art",
"token": "Token art",
"wildcard": "Token art if wildcard"
},
default: "character", // Default value
type: String // Value type
});
// client setting
game.settings.register("image-hover", "userEnableModule", {
name: "Enable/Disable Image Hover", // Setting name
hint: "Uncheck to disable Image Hover (per user).", // Setting description
scope: "client", // client-stored setting
config: true, // Show setting in configuration view
type: Boolean, // Value type
default: true, // The default value for the setting
onChange: value => { canvas.hud.imageHover.clear()}
});
// client setting
game.settings.register("image-hover", "userEnableKeybind", {
name: "Enable/Disable Keybind requirement", // Setting name
hint: "Check to enable a keybind requirement while hovering a token (per user).", // Setting description
scope: "client", // client-stored setting
config: true, // Show setting in configuration view
type: Boolean, // Value type
default: false, // The default value for the setting
});
// client setting
game.settings.register("image-hover", "userKeybindButton", {
name: "Keybind", // Setting name
hint: "Assign the additional keybind requirement to show a image while hovering a token (per user).", // Setting description
type: window.Azzu.SettingsTypes.KeyBinding,
scope: "client", // Client-stored setting
config: true, // Show setting in configuration view
default: 'v', // Default Value
});
// client setting
game.settings.register("image-hover", "userImagePosition", {
name: "Position of image", // Setting name
hint: "Set the location of the image on the screen (per user).", // Setting description
scope: "client", // Client-stored setting
config: true, // Show setting in configuration view
choices: { // Choices
"Bottom left": "Bottom left",
"Bottom right": "Bottom right",
"Top left": "Top left",
"Top right": "Top right"
},
default: "Bottom left", // Default Value
type: String // Value type
});
// client setting
game.settings.register("image-hover", "userImageSize", {
name: "Image to monitor width", // Setting name
hint: "Changes the size of the image (per user), smaller value implies larger image (1/value of your screen width).", // Setting description
scope: "client", // Client-stored setting
config: true, // Show setting in configuration view
range: { // Choices
min: 3,
max: 20,
step: 0.5
},
default: 7, // Default Value
type: Number // Value type
});
}
}