-
Notifications
You must be signed in to change notification settings - Fork 10
/
minimalui.js
57 lines (45 loc) · 1.8 KB
/
minimalui.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
import MinimalUIControls from './modules/component/controls.js'
import MinimalUIHotbar from './modules/component/hotbar.js'
import MinimalUILogo from './modules/component/logo.js'
import MinimalUINavigation from './modules/component/navigation.js'
import MinimalUIPlayers from './modules/component/players.js'
import MinimalUISidebar from './modules/component/sidebar.js'
import MinimalUITheme from './modules/customization/theme.js'
import MinimalUIPatch from "./modules/patch.js";
class MinimalUI {
static noColorSettings = false;
}
Hooks.once('init', () => {
/** Initialize settings for Theme Functionality */
if (game.modules.get('colorsettings')?.active) {
MinimalUITheme.initSettings();
MinimalUITheme.initHooks();
} else {
MinimalUI.noColorSettings = true;
}
/** ------------------------- */
/** Initialize settings for Core Component Functionality */
MinimalUILogo.initSettings();
MinimalUINavigation.initSettings();
MinimalUIControls.initSettings();
MinimalUIHotbar.initSettings();
MinimalUISidebar.initSettings();
MinimalUIPlayers.initSettings();
/** ------------------------- */
/** Initialize hooks for Core Component Functionality */
MinimalUILogo.initHooks();
MinimalUINavigation.initHooks();
MinimalUIControls.initHooks();
MinimalUIHotbar.initHooks();
MinimalUISidebar.initHooks();
MinimalUIPlayers.initHooks();
/** ------------------------- */
/** Initialize Foundry UI Patches */
MinimalUIPatch.initSettings();
MinimalUIPatch.initHooks();
/** ------------------------- */
});
Hooks.once('ready', () => {
if (MinimalUI.noColorSettings && game.user.isGM)
ui.notifications.error("Minimal UI: Disabled color features because 'lib - colorsettings' module is not active.");
})