Is there an existing way to add some extensive help to SugarCube’s Settings dialog popup? I mean help that’s more verbose than would be appropriate in the current desc: parameter.
I’d rather not write my own version of the Setting dialog popup if I can avoid it.
The hack that I’m in the middle of implementing is to provide an optional “Settings Help” button in the GUI column (using the StoryMenu code passage). That button would take the reader to a “Settings Help” passage which itself would include links to the Setting dislog popup in appropriate places.
Ideally, I’d like to add a “Help” button as a prefix to each of the Setting dialog entries, but that probably would require nested dialog popups, which I don’t think are currently available.
Also there are JavaScript related Dialog Events you can listen for (like :dialogopening) that then allow you to alter the HTML structure of the dialog before it is shown.
eg. the following JavaScript example add a listener for the opening of the Setting dialog…
$(document).on(':dialogopening', '.settings', (ev) => {
/* JavaScript that alters the contents of the dialog */
}
…and you can use jQuery like the following inside that listener to access the body area of the dialog…
…or save the initial jQuery call to a variable and then use it when calling the methods…
let el = $(ev.target);
/* via seperate calls... */
el.append(`<p>addition content</p>`);
el.wiki('<<button "Help">><</button>>');
/* via chaining... */
el
.append(`<p>addition content</p>`)
.wiki('<<button "Help">><</button>>');