Skip to content

Commit 3513729

Browse files
authored
Merge pull request #58 from SpringRoll/chore/minor-doc-updates
Chore/minor doc updates
2 parents 0238f77 + bec98f7 commit 3513729

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ or an `HTMLElement`.
8080

8181
Plugins in the SpringRollContainer correspond to a matching [feature in SpringRoll Core](https://github.com/SpringRoll/SpringRoll/tree/develop/src#features).
8282
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.
8484

8585
### PausePlugin, HelpPlugin:
8686
```javascript
@@ -94,12 +94,13 @@ const container = new springroll.Container("#game", {
9494
});
9595
container.openPath('game.html');
9696
```
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.
9899

99100
### 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.
103104

104105
```javascript
105106
import { CaptionsStylePlugin, CaptionsToggleplugin, Container } from 'springroll-container';
@@ -179,10 +180,10 @@ const container = new springroll.Container('#game', {
179180
});
180181
container.openPath('game.html');
181182
```
182-
SoundPlugin will set a class of `muted` or `unmuted` on each button as they are toggled
183+
`SoundPlugin` will set a class of `muted` or `unmuted` on each button as they are toggled
183184

184185
### Mechanics:
185-
Mechanics are various aspects of the game that the determine how a user plays the game (see table below for details).
186+
Mechanics are various configurable aspects of the game that can determine how a user plays the game (see table below for details).
186187
Some games will support many of these features, some none at all. We doubt one game will use all of them though.
187188

188189
Each plugin is responsible for one of the listed mechanics and should be provided a
@@ -277,7 +278,7 @@ const container = new springroll.Container('#game', {
277278
container.openPath('game.html');
278279
```
279280

280-
The HUDPlugin requests the supported positions directly from the game itself and builds out an internal list of positions dynamically,
281+
The HUD Plugin requests the supported positions directly from the game itself and builds out an internal list of positions dynamically,
281282
e.g. if the game supports Top and Bottom HUD docking (stored internally as `['top', 'bottom']`) then the plugin will hide the "left" and "right"
282283
radio buttons so only the valid ones are displayed to users.
283284

@@ -310,7 +311,7 @@ container.openPath('game.html');
310311
```
311312
*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.
312313

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:
314315
The className shown is the default, but can be overridden through the `customClassName` option. The IDs are generated based on the action name.
315316

316317
```html
@@ -359,7 +360,7 @@ As long as the string you pass to the constructor is a valid selector string the
359360

360361
*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.
361362

362-
### Play Options
363+
## Play Options
363364
The `openPath` method of the Container provides a mechanism for providing options directly to the game, called
364365
`playOptions`:
365366

@@ -388,8 +389,8 @@ app.on('init', function() {
388389

389390
Any JSON-serializable object can be set as a `playOption`.
390391

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`.
393394
It allows the container (or the Springroll Application) to store key-value pairs in local or session storage. It is primarily
394395
used to store user data for use across the Springroll environment. Examples are listed below for each class.
395396

@@ -441,12 +442,8 @@ container.openPath('game.html');
441442
```
442443
There is no configuration required for the UserDataPlugin as it just handles requests from the Application.
443444

444-
## Documentation
445-
446-
[API Documentation](http://springroll.github.io/SpringRollContainer/) has full documentation for the Container.
447-
448445
## License
449446

450-
Copyright (c) 2018 [SpringRoll](http://github.com/SpringRoll)
447+
Copyright (c) 2020 [SpringRoll](http://github.com/SpringRoll)
451448

452449
Released under the MIT License.

0 commit comments

Comments
 (0)