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
Copy file name to clipboardExpand all lines: README.md
+14-17Lines changed: 14 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ or an `HTMLElement`.
80
80
81
81
Plugins in the SpringRollContainer correspond to a matching [feature in SpringRoll Core](https://github.com/SpringRoll/SpringRoll/tree/develop/src#features).
82
82
If the container has a plugin enabled corresponding to a feature that the game doesn't contain, the container will automatically _hide the corresponding UI element_.
83
-
For example, if the container has the `CaptionsPlugin` enabled with a corresponding button to toggle captions but the game doesn't actually _have_ captions, the container will hide the captions toggle button automatically.
83
+
For example, if the container has the `CaptionsTogglePlugin` enabled with a corresponding button to toggle captions but the game doesn't actually _have_ captions, the container will hide the captions toggle button automatically.
84
84
85
85
### PausePlugin, HelpPlugin:
86
86
```javascript
@@ -94,12 +94,13 @@ const container = new springroll.Container("#game", {
94
94
});
95
95
container.openPath('game.html');
96
96
```
97
-
PausePlugin sets a className of 'paused' or 'unpaused' on individual pause buttons.
97
+
98
+
`PausePlugin` sets a className of 'paused' or 'unpaused' on individual pause buttons.
98
99
99
100
### Captions:
100
-
There are two plugins that interact with captions: CaptionsTogglePlugin, and CaptionsStylePlugin.
101
-
CaptionsTogglePlugin allows the user to hide or show the captions in the game.
102
-
CaptionsStylePlugin allows the user to control the size, placement, and color of the captions.
101
+
There are two plugins that interact with captions: `CaptionsTogglePlugin`, and `CaptionsStylePlugin`.
102
+
`CaptionsTogglePlugin` allows the user to hide or show the captions in the game.
103
+
`CaptionsStylePlugin` allows the user to control the size, placement, and color of the captions.
*The Key Binding functionality of the `KeyboardMapPlugin` works similarly to the HUDPlugin in that it requests information from the Springroll Application. See [the SpringRoll Application Class docs](https://github.com/SpringRoll/SpringRoll/tree/v2/src#handling-state-change) for more information on the request format.
312
313
313
-
The HTML output within the key container will be look like the following:
314
+
The HTML output within the key container will look like the following:
314
315
The className shown is the default, but can be overridden through the `customClassName` option. The IDs are generated based on the action name.
315
316
316
317
```html
@@ -359,7 +360,7 @@ As long as the string you pass to the constructor is a valid selector string the
359
360
360
361
*Note: at this time there is no support for multiple HTMLElements as parameters. If you are passing an HTMLElement as the parameter rather than a selector string you cannot pass multiple controls. If you do wish to use multiple controls, pass the plugin a selector string instead.
361
362
362
-
###Play Options
363
+
## Play Options
363
364
The `openPath` method of the Container provides a mechanism for providing options directly to the game, called
364
365
`playOptions`:
365
366
@@ -388,8 +389,8 @@ app.on('init', function() {
388
389
389
390
Any JSON-serializable object can be set as a `playOption`.
390
391
391
-
## SavedData
392
-
The SavedData API is made up of three classes: SavedData, SavedDataHandler, and the UserDataPlugin.
392
+
## Saved Data API
393
+
The SavedData API is made up of three classes: `SavedData`, `SavedDataHandler`, and the `UserDataPlugin`.
393
394
It allows the container (or the Springroll Application) to store key-value pairs in local or session storage. It is primarily
394
395
used to store user data for use across the Springroll environment. Examples are listed below for each class.
0 commit comments