Generate settings pages automatically.

This adds metadata to settings fields that can be used to automatically
generate the settings window. For now I have replaced the Difficulty
page. Will follow up to replace the others.
This commit is contained in:
Dan Albert
2021-09-12 16:44:01 -07:00
parent 39fae9effc
commit 7bec4c62f7
13 changed files with 518 additions and 329 deletions

View File

@@ -0,0 +1,20 @@
from typing import Any, Optional
from .choicesoption import choices_option
def skill_option(
text: str,
page: str,
section: str,
detail: Optional[str] = None,
**kwargs: Any,
) -> str:
return choices_option(
text,
page,
section,
["Average", "Good", "High", "Excellent"],
detail=detail,
**kwargs,
)