I figured that I might as well post a note that I've just published a new release of SugarCube
for those of you using it.
- Added dynamic updating to several of the page elements within the UI bar (sidebar) when passages are displayed, which is configured via the config.updatePageElements property (default: true). The affected elements are the story: banner, subtitle, author, caption, and menu. Note: Since SugarCube uses the story's title as the basis for the key used to store and load data used when playing the story and for saves, it is not included in updates and it is strongly recommended that you do not add any kind of dynamic code to it.
- Added a seedable PRNG which integrates with the story history (incl. saves), which is configured via the History.initPRNG() static method.
- Changed the saves menu so that the delete and purge buttons no longer close the menu. This should make it more convenient for players to reuse save slots, since they can now delete and then immediately save without having to reopen the menu.
- Updated the <<if>> macro to emit an error if an expression is supplied to the <<else>> clause. This is primarily to flag improper <<else if>> usage for authors.
- Updated the <<optionbar>> macro's output to reflect the changes to UISystem.
- Updated UISystem:
- Added the new static method UISystem.alert(), which opens a window.alert()-style message box.
- Added the new static method UISystem.show(), which opens the UI dialog window and is now the basic method by which all dialogs are opened.
- Made various improvements to UISystem.
- Updated the UI CSS styles.
- Updated the default CSS @media query for mobile devices.
- Updated the feature detection logic a bit and the feature polyfills.
- Updated the embedded jQuery library (to v2.1.0).
- Embedded the seedrandom.js library.
- Moved the history (un)marshaling code out of SaveSystem and into History. This was spurred on in large part by the integration of the seedable PRNG into History. This also necessitated save format changes.
- Moved several internal utility functions into the Util object for namespacing.