#SettingsButton for more settings
1 messages · Page 1 of 1 (latest)
@buoyant ibex this is the button
to work it does need a LootPopulatorSettingsConfig class.
Or whatever you name it in your module.
import the class in the file where you register the setting. (see the link for an example (config.mjs))
this.gs. has to be game.settings
this.gs was just my shorthand
~~LootPopulatorSettingsConfig ~~ MyNiceDiceSettingsConfig
create a SettingsConfig.js
and what in it?
create a class in there that extends the FormApplication
/**
* A game settings configuration application
* This form renders the settings defined via the game.settings.register API which have config = true
*
* @extends {FormApplication}
*/
class MyNiceDiceSettingsConfig extends FormApplication {
constructor() {
super();
return this;
}
/*** the settings form */
}
With that, the button maybe already is visible.
As per this link: https://foundryvtt.com/api/FormApplication.html
You will see that you can do some stuff in different methods that will be called
Documentation for the client-side JavaScript API in Foundry Virtual Tabletop.
nope i cant see button
does your console spit out errors?
at the very end
export { DiceConfig };
and if you take a look at link to my module.
I said this.gs should be game.settings
ok i fix that and working
and how now open popup with it?
and i must create .html template?
If you take a look at my module which I linked above, you can see in the config.js and the templates how to create some tabs in there and more options
.html or .hbs