You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sets the maximum number of states (moments) to which the history is allowed to grow. Should the history exceed the limit, states will be dropped from the past (oldest first). A setting of `0` means that there is no limit to how large the history may grow, though doing so is not recommended.
81
81
82
-
#### Since:
82
+
#### History:
83
83
84
84
*`v2.0.0`: Introduced.
85
85
@@ -112,7 +112,7 @@ Determines whether the [`<<if>>` macro](#macros-macro-if) returns an error when
112
112
This setting exists because it's unlikely that you'll ever want to actually perform an assignment within a conditional expression and typing <code>=</code> when you meant <code>===</code> (or <code>==</code>) is a fairly easy to mistake make—either from a finger slip or because you just don't know the difference between the operators.
113
113
</p>
114
114
115
-
#### Since:
115
+
#### History:
116
116
117
117
*`v2.0.0`: Introduced.
118
118
@@ -133,7 +133,7 @@ Sets the maximum number of iterations allowed before the [`<<for>>` macro](#macr
133
133
This setting exists to prevent a misconfigured loop from making the browser unresponsive.
Sets the default [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value that causes the currently running [`<<type>>` macro](#macros-macro-type) instance to finish typing its content immediately.
Allows the destination of passage navigation to be overridden. The callback is passed one parameter, the original destination passage title. If its return value is falsy, the override is cancelled and navigation to the original destination continues unperturbed. If its return value is truthy, the override succeeds and that value is used as the new destination of the navigation.
192
192
193
-
#### Since:
193
+
#### History:
194
194
195
195
*`v2.13.0`: Introduced.
196
196
@@ -236,7 +236,7 @@ Determines whether alternate passage descriptions are used by the *Saves* and *J
236
236
</ul>
237
237
</div>
238
238
239
-
#### Since:
239
+
#### History:
240
240
241
241
*`v2.0.0`: Introduced.
242
242
@@ -265,7 +265,7 @@ Config.passages.descriptions = function () {
265
265
266
266
Determines whether passage titles are combined with the story title, within the browser's/tab's titlebar, when passages are displayed.
267
267
268
-
#### Since:
268
+
#### History:
269
269
270
270
*`v2.0.0`: Introduced.
271
271
@@ -285,7 +285,7 @@ Determines whether rendering passages have their leading/trailing newlines remov
285
285
Does not affect <code>script</code> or <code>stylesheet</code> tagged passages, for Twine 1/Twee, or the Story JavaScript or Story Stylesheet sections, for Twine 2.
286
286
</p>
287
287
288
-
#### Since:
288
+
#### History:
289
289
290
290
*`v2.19.0`: Introduced.
291
291
@@ -309,7 +309,7 @@ Does not affect <code>script</code> or <code>stylesheet</code> tagged passages,
309
309
The function will be called just before the built-in no-break passage processing if you're also using that—see the <ahref="#config-api-property-passages-nobr"><code>Config.passages.nobr</code> setting</a> and <ahref="#special-tag-nobr"><code>nobr</code> special tag</a>.
310
310
</p>
311
311
312
-
#### Since:
312
+
#### History:
313
313
314
314
*`v2.30.0`: Introduced.
315
315
@@ -328,7 +328,7 @@ Config.passages.onProcess = function (p) {
328
328
329
329
Sets the starting passage, the very first passage that will be displayed.
330
330
331
-
#### Since:
331
+
#### History:
332
332
333
333
*`v2.0.0`: Introduced.
334
334
@@ -348,7 +348,7 @@ Determines whether outgoing passage transitions are enabled. Valid values are t
348
348
If using an integer delay, ideally, it should probably be slightly longer than the outgoing transition delay that you intend to use—e.g., an additional 10ms or so should be sufficient.
349
349
</p>
350
350
351
-
#### Since:
351
+
#### History:
352
352
353
353
*`v2.0.0`: Introduced.
354
354
@@ -405,7 +405,7 @@ Determines whether the autosave, if it exists, is automatically loaded upon stor
405
405
If the autosave cannot be loaded, for any reason, then the start passage is loaded instead.
406
406
</p>
407
407
408
-
#### Since:
408
+
#### History:
409
409
410
410
*`v2.0.0`: Introduced.
411
411
@@ -434,7 +434,7 @@ Determines whether the autosave is created/updated when passages are displayed.
434
434
When setting the value to boolean <code>true</code>, you will likely also need to use the <ahref="#config-api-property-saves-isallowed"><code>Config.saves.isAllowed</code> property</a> to disallow saving on the start passage. Or, if you use the start passage as real part of your story and allow the player to reenter it, rather than just as the initial landing/cover page, then you may wish to only disallow saving on the start passage the very first time it's displayed—i.e., at story startup.
435
435
</p>
436
436
437
-
#### Since:
437
+
#### History:
438
438
439
439
*`v2.0.0`: Introduced.
440
440
*`v2.30.0`: Added function values and deprecated string values.
@@ -460,7 +460,7 @@ Config.saves.autosave = function () {
Determines whether saving is allowed within the current context. The callback is invoked each time a save is requested. If its return value is falsy, the save is disallowed. If its return value is truthy, the save is allowed to continue unperturbed.
478
478
479
-
#### Since:
479
+
#### History:
480
480
481
481
*`v2.0.0`: Introduced.
482
482
@@ -494,7 +494,7 @@ Config.saves.isAllowed = function () {
494
494
495
495
Performs any required pre-processing before the save data is loaded—e.g., upgrading out-of-date save data. The callback is passed one parameter, the save object to be processed. If it encounters an unrecoverable problem during its processing, it may throw an exception containing an error message; the message will be displayed to the player and loading of the save will be terminated.
496
496
497
-
#### Since:
497
+
#### History:
498
498
499
499
*`v2.0.0`: Introduced.
500
500
@@ -522,7 +522,7 @@ Config.saves.onLoad = function (save) {
522
522
523
523
Performs any required post-processing before the save data is saved. The callback is passed two parameters, the save object to be processed and save operation details object.
524
524
525
-
#### Since:
525
+
#### History:
526
526
527
527
*`v2.0.0`: Introduced.
528
528
*`v2.33.0`: Added save operation details object parameter to the callback function.
@@ -581,7 +581,7 @@ Config.saves.onSave = function (save, details) {
581
581
582
582
Sets the maximum number of available save slots.
583
583
584
-
#### Since:
584
+
#### History:
585
585
586
586
*`v2.0.0`: Introduced.
587
587
@@ -601,7 +601,7 @@ Sets the `version` property of saves.
601
601
This setting is only used to set the <code>version</code> property of saves. Thus, it is only truly useful if you plan to upgrade out-of-date saves via a <ahref="#config-api-property-saves-onload"><code>Config.saves.onLoad</code></a> callback.
602
602
</p>
603
603
604
-
#### Since:
604
+
#### History:
605
605
606
606
*`v2.0.0`: Introduced.
607
607
@@ -627,7 +627,7 @@ Config.saves.version = "v3";
627
627
628
628
Determines whether the UI bar (sidebar) starts in the stowed (shut) state initially. Valid values are boolean `true`/`false`, which causes the UI bar to always/never start in the stowed state, or an integer, which causes the UI bar to start in the stowed state if the viewport width is less-than-or-equal-to the specified number of pixels.
629
629
630
-
#### Since:
630
+
#### History:
631
631
632
632
*`v2.11.0`: Introduced.
633
633
@@ -654,7 +654,7 @@ Determines whether certain elements within the UI bar are updated when passages
654
654
The story title is not included in updates because SugarCube uses it as the basis for the key used to store and load data used when playing the story and for saves.
655
655
</p>
656
656
657
-
#### Since:
657
+
#### History:
658
658
659
659
*`v2.0.0`: Introduced.
660
660
@@ -681,7 +681,7 @@ Determines whether the `link-visited` class is added to internal passage links t
681
681
You <em>must</em> provide your own styling for the <code>link-visited</code> class as none is provided by default.
682
682
</p>
683
683
684
-
#### Since:
684
+
#### History:
685
685
686
686
*`v2.0.0`: Introduced.
687
687
@@ -707,7 +707,7 @@ You will also need to specify a `.link-visited` style that defines the propertie
707
707
708
708
Determines whether the output of the Wikifier is post-processed into more sane markup—i.e., where appropriate, it tries to transition the plethora of `<br>` elements into `<p>` elements.
709
709
710
-
#### Since:
710
+
#### History:
711
711
712
712
*`v2.0.0`: Introduced.
713
713
@@ -727,7 +727,7 @@ Indicates whether SugarCube is running in test mode, which enables debug views.
727
727
This property is automatically set based on whether you're using a testing mode in a Twine compiler—i.e., <em>Test</em> mode in Twine 2, <em>Test Play From Here</em> in Twine 1, or the test mode option (<code>-t</code>, <code>--test</code>) in Tweego. You may, however, forcibly enable it if you need to for some reason—e.g., if you're using another compiler, which doesn't offer a way to enable test mode.
728
728
</p>
729
729
730
-
#### Since:
730
+
#### History:
731
731
732
732
*`v2.2.0`: Introduced.
733
733
@@ -754,7 +754,7 @@ if (Config.debug) {
754
754
755
755
Sets the integer delay (in milliseconds) before the loading screen is dismissed, once the document has signaled its readiness. Not generally necessary, however, some browsers render slower than others and may need a little extra time to get a media-heavy page done. This allows you to fine tune for those cases.
Copy file name to clipboardExpand all lines: docs/api/api-dialog.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Appends the given content to the dialog's content area. Returns a reference to
13
13
If your content contains any SugarCube markup, you'll need to use the <ahref="#dialog-api-method-wiki"><code>Dialog.wiki()</code> method</a> instead.
14
14
</p>
15
15
16
-
#### Since:
16
+
#### History:
17
17
18
18
*`v2.9.0`: Introduced.
19
19
@@ -35,7 +35,7 @@ Dialog.append( /* some DOM nodes */ );
35
35
36
36
Returns a reference to the dialog's content area.
37
37
38
-
#### Since:
38
+
#### History:
39
39
40
40
*`v2.0.0`: Introduced.
41
41
@@ -55,7 +55,7 @@ jQuery(Dialog.body()).wiki("Cry 'Havoc!', and let slip the //ponies// of ''frien
55
55
56
56
Closes the dialog. Returns a reference to the `Dialog` object for chaining.
57
57
58
-
#### Since:
58
+
#### History:
59
59
60
60
*`v2.0.0`: Introduced.
61
61
@@ -73,7 +73,7 @@ Dialog.close();
73
73
74
74
Returns whether the dialog is currently open.
75
75
76
-
#### Since:
76
+
#### History:
77
77
78
78
*`v2.0.0`: Introduced.
79
79
@@ -103,7 +103,7 @@ Opens the dialog. Returns a reference to the `Dialog` object for chaining.
103
103
Call this only after populating the dialog with content.
104
104
</p>
105
105
106
-
#### Since:
106
+
#### History:
107
107
108
108
*`v2.0.0`: Introduced.
109
109
@@ -130,7 +130,7 @@ Dialog.open();
130
130
131
131
Prepares the dialog for use and returns a reference to its content area.
132
132
133
-
#### Since:
133
+
#### History:
134
134
135
135
*`v2.0.0`: Introduced.
136
136
@@ -168,7 +168,7 @@ Renders the given [markup](#markup) and appends it to the dialog's content area.
168
168
If your content consists of DOM nodes, you'll need to use the <ahref="#dialog-api-method-append"><code>Dialog.append()</code> method</a> instead.
169
169
</p>
170
170
171
-
#### Since:
171
+
#### History:
172
172
173
173
*`v2.9.0`: Introduced.
174
174
@@ -190,7 +190,7 @@ Dialog.wiki("Cry 'Havoc!', and let slip the //ponies// of ''friendship''.");
190
190
This method has been deprecated and should no longer be used. The core of what it does is simply to wrap a call to <ahref="#dialog-api-method-open"><code>Dialog.open()</code></a> within a call to <ahref="#methods-jquery-prototype-method-ariaclick"><code><jQuery>.ariaClick()</code></a>, which can be done directly and with greater flexibility.
0 commit comments