export function registerSettings(AscAssetManager) { console.log("Registering settings for My Module..."); const ID = AscAssetManager.ID //Ability // Register the "enableFeature" setting game.settings.register(ID, "enableFeature", { name: "Enable Feature", hint: "Enable or disable the special feature of this module.", scope: "world", config: true, type: Boolean, default: true, onChange: value => { console.log(`Enable Feature setting changed to: ${value}`); } }); // Register the "customMessage" setting game.settings.register(ID, "rootDirectory", { name: "Root Directory", hint: "Root Directory to save files", scope: "client", config: true, type: String, default: `worlds/${game.data.world.id}/`, filePicker: "folder", onChange: value => { console.log(`Custom Message changed to: ${value}`); } }); // Register a dropdown setting game.settings.register(ID, "theme", { name: "Select Theme", hint: "Choose a theme for the module.", scope: "world", config: true, type: String, choices: { light: "Light Theme", dark: "Dark Theme", system: "Use System Default" }, default: "system", onChange: value => { console.log(`Theme changed to: ${value}`); } }); game.settings.registerMenu(ID, "instructions", { name: "Add macro to hotbar", label: "Get Macro", scope: "world", icon: "fas fa-code", config: true, type: class extends FormApplication { static get defaultOptions() { return mergeObject(super.defaultOptions, { id: ID, // Unique ID for the application title: "Simple Form Application", // Title of the window template: AscAssetManager.TEMPLATES.SETTINGS_MENU_MACRO, // Path to your Handlebars template width: 300, // Width of the form height: "auto", // Adjust height automatically }); } async getData() { const macros = game.packs.get("asc-asset-manager.asc-asset-manager-macros").getDocuments() return { moduleId: ID, macros: await macros } } }, }); }