20Q better refresh, stay in same tab
This commit is contained in:
@@ -60,7 +60,9 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
class: "twenty-questions",
|
class: "twenty-questions",
|
||||||
icon: "fas fa-sync-alt",
|
icon: "fas fa-sync-alt",
|
||||||
onclick: async () => {
|
onclick: async () => {
|
||||||
await new TwentyQuestionsDialog(this.actor).render(true);
|
this._initialize(game.actors.get(this.actor._id));
|
||||||
|
await this._constructCache();
|
||||||
|
this.render(false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return buttons;
|
return buttons;
|
||||||
@@ -71,6 +73,14 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
constructor(actor = null, options = {}) {
|
constructor(actor = null, options = {}) {
|
||||||
super({}, options);
|
super({}, options);
|
||||||
|
this._initialize(actor);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize actor and object for dialog
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_initialize(actor) {
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
this.object = new TwentyQuestions(actor);
|
this.object = new TwentyQuestions(actor);
|
||||||
this.summary = this.object.validateForm();
|
this.summary = this.object.validateForm();
|
||||||
|
|||||||
Reference in New Issue
Block a user