Skip to content

Commit

Permalink
Update HELP_MENU.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RedMisao authored Dec 7, 2024
1 parent 54511af commit 187f26f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions doc/HELP_MENU.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Each category is made up of a json object which for mods can be placed anywhere
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `"type"` | (required) must be `"help"` |
| `"order"` | (required) integer, where this category should appear in the list relative to others from the same source, with 0 being first. Must be unique per source (Every mod can start from 0). Each mods categories are appended to the end of the list per their load order. |
| `"name"` | (required) string, name of the category, can use [color tags](COLOR.md#Color tags) |
| `"messages"` | (required) array of strings, each string respresents a new line seperated paragraph containing information for this category, can use [color tags](COLOR.md#Color tags) and [keybind tags](#Keybind tags). Seperated mainly for ease of editing the json as `\n` lets you add newlines within strings |
| `"name"` | (required) string, name of the category, can use [color tags](COLOR.md#color-tags) |
| `"messages"` | (required) array of strings, each string respresents a new line seperated paragraph containing information for this category, can use [color tags](COLOR.md#color-tags) and [keybind tags](#keybind-tags). Seperated mainly for ease of editing the json as `\n` lets you add newlines within strings |

### Keybind tags

The keybind tags here use a different syntax than elsewhere for now.
Keybind tags take the form <press_keybind> where keybind corresponds to a keybind id, most of which are found in [keybindings.json](./data/raw/keybindings.json) and are automatically colored light blue.
Keybind tags take the form <press_keybind> where keybind corresponds to a keybind id, most of which are found in [keybindings.json](/data/raw/keybindings.json) and are automatically colored light blue.

### Special tags

`<DRAW_NOTE_COLORS>` and `<HELP_DRAW_DIRECTIONS>` are special hardcoded tags that can be found in [help.cpp](./src/help.cpp)
`<DRAW_NOTE_COLORS>` and `<HELP_DRAW_DIRECTIONS>` are special hardcoded tags that can be found in [help.cpp](/src/help.cpp).
`<DRAW_NOTE_COLORS>` displays a list of all the color abbreviations to be used with overmap notes.
`<HELP_DRAW_DIRECTIONS>` displays the hjkl and numpad movement directions in a nicely rendered way. The movement directions have 3 binds by default with the above keybind tags not letting you specify which to use so unhardcoding it would result in a messier drawing.
`<HELP_DRAW_DIRECTIONS>` displays the <kbd>h</kbd><kbd>j</kbd><kbd>k</kbd><kbd>l</kbd> and numpad movement directions in a nicely rendered way. The movement directions have 3 binds by default with the above keybind tags not letting you specify which to use so unhardcoding it would result in a messier drawing.

### Example

Expand All @@ -34,3 +34,7 @@ Keybind tags take the form <press_keybind> where keybind corresponds to a keybin
"messages": [ "A useful tip.", "<color_red>Some scary warning.</color>", "A list of three keybinds.\n<press_pause> lets you pass one second.\n<press_wait> lets you wait for longer.\n<press_sleep> lets you sleep." ]
},
```
Which will be displayed as:

![help example](https://github.com/user-attachments/assets/e6d620a0-0123-4beb-afcc-3e68f73597ca)

0 comments on commit 187f26f

Please sign in to comment.