Skip to content

Commit

Permalink
new tags
Browse files Browse the repository at this point in the history
  • Loading branch information
klavins committed Mar 6, 2020
1 parent 35c3d2e commit c6a63de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ The port for the server. Use `8765` for now.
> ```
> The name field is used to catch button click events (see below). The label field defines the string displayed on the button.
> The style field is an `css` code you want to add to the stying of the button.
> <span style='background: yellow'>(New in 1.0)</span>
> `agents`<br>
> A list of agents to put in the simulation. For example,
Expand Down Expand Up @@ -288,6 +289,7 @@ The brower client relays mouse click, button press, and keyboard events to the e
> Name: `button_click`
> Value: An object with the a `name` field that matches the name field used in `config.json`.
> <span style='background: yellow'>(New in 1.0)</span>
> Name: `keydown`
> Value: An object with a `key` field, which is the character pressed, as well as the following boolean fields
Expand All @@ -297,9 +299,11 @@ The brower client relays mouse click, button press, and keyboard events to the e
> altKey
> metaKey
> ```
> <span style='background: yellow'>(New in 1.0)</span>
> Name: `keyup`
> Value: Same as for `keydown`.
> <span style='background: yellow'>(New in 1.0)</span>
To respond to events in your code, you should put elma watchers into the `init()` method of some process. For example, to respond to an agent click, you might do
```c++
Expand Down

0 comments on commit c6a63de

Please sign in to comment.