Docs: Add detail on customizing the forced groups (#3371)
* Docs: Fix incorrect assertion in option group docs and add detail on customizing the forced groups. * add docs for the visibility attribute * typos * review comments * missed one Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * better wording Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
parent
133167564c
commit
3cc391e9a1
|
@ -86,17 +86,29 @@ class ExampleWorld(World):
|
|||
```
|
||||
|
||||
### Option Groups
|
||||
Options may be categorized into groups for display on the WebHost. Option groups are displayed alphabetically on the
|
||||
player-options and weighted-options pages. Options without a group name are categorized into a generic "Game Options"
|
||||
group.
|
||||
Options may be categorized into groups for display on the WebHost. Option groups are displayed in the order specified
|
||||
by your world on the player-options and weighted-options pages. In the generated template files, there will be a comment
|
||||
with the group name at the beginning of each group of options. The `start_collapsed` Boolean only affects how the groups
|
||||
appear on the WebHost, with the grouping being collapsed when this is `True`.
|
||||
|
||||
Options without a group name are categorized into a generic "Game Options" group, which is always the first group. If
|
||||
every option for your world is in a group, this group will be removed. There is also an "Items & Location Options"
|
||||
group, which is automatically created using certain specified `item_and_loc_options`. These specified options cannot be
|
||||
removed from this group.
|
||||
|
||||
Both the "Game Options" and "Item & Location Options" groups can be overridden by creating your own groups with
|
||||
those names, letting you add options to them and change whether they start collapsed. The "Item &
|
||||
Location Options" group can also be moved to a different position in the group ordering, but "Game Options" will always
|
||||
be first, regardless of where it is in your list.
|
||||
|
||||
```python
|
||||
from worlds.AutoWorld import WebWorld
|
||||
from Options import OptionGroup
|
||||
from . import Options
|
||||
|
||||
class MyWorldWeb(WebWorld):
|
||||
option_groups = [
|
||||
OptionGroup('Color Options', [
|
||||
OptionGroup("Color Options", [
|
||||
Options.ColorblindMode,
|
||||
Options.FlashReduction,
|
||||
Options.UIColors,
|
||||
|
|
Loading…
Reference in New Issue