#SettingsButton for more settings

1 messages · Page 1 of 1 (latest)

floral bear
#

@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))

buoyant ibex
#

and this dont working

floral bear
#

~~LootPopulatorSettingsConfig ~~ MyNiceDiceSettingsConfig

#

create a SettingsConfig.js

buoyant ibex
#

and what in it?

floral bear
#

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.

buoyant ibex
#

nope i cant see button

floral bear
#

does your console spit out errors?

buoyant ibex
floral bear
#

at the very end

export { DiceConfig };

buoyant ibex
#

now this xD

floral bear
#

and if you take a look at link to my module.
I said this.gs should be game.settings

buoyant ibex
#

ok i fix that and working

#

and how now open popup with it?

#

and i must create .html template?

floral bear
#

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

buoyant ibex
#

yeah

#

for now i copy dice so nice .html but this working

#

and what is "tabs"?

floral bear
#

basically what you have in the screenshot.
A menu where each item has a content box associated.
You click a menu item it switches to that content