ChapelR / custom-macros-for-sugarcube-2

A collection of systems and macros for Twine.
https://macros.twinelab.net/
The Unlicense
166 stars 44 forks source link

Update dialog-api-macro-set.js #71

Open manonamora opened 2 months ago

manonamora commented 2 months ago

SugarCube 2.37.3 update: switched Dialog.setup for Dialog.create + the wiki on the popup

ChapelR commented 2 months ago

This would break support for versions older than 2.36, right? That would be a breaking change for older versions so it's probably best not to change to the new API unless SC removes the old methods completely.

manonamora commented 2 months ago

Yeah... it would. But because 2.37 deprecated Dialog.setup, it might be nice to have a version for 2.37 as well?

greyelf commented 2 months ago

Yeah... it would. But because 2.37 deprecated Dialog.setup, it might be nice to have a version for 2.37 as well?

I'm curious, what exactly would be gained by having an additional <<dialog>> equivalent macro that internally does this...

Dialog.create(title, classes.join(' '));

..instead of this...

Dialog.setup(title, classes.join(' '));
ChapelR commented 2 months ago

It is future proofed. I guess I could have a separate branch for post-2.37, I'll think about whether I want to do that.