help
The help screen.
Classes⚓︎
Help ⚓︎
Bases: ModalScreen
Screen with the help dialog.
Source code in tui_typer_tutor/screens/help.py
class Help(ModalScreen): # type: ignore[type-arg]
"""Screen with the help dialog."""
DEFAULT_CSS: ClassVar[str] = """
Help {
align: center middle;
}
#text {
content-align: center middle;
height: 50%;
width: 50%;
}
"""
BINDINGS: ClassVar[list[Binding]] = [ # type: ignore[assignment]
Binding('escape', 'close', 'Close'),
]
def compose(self) -> ComposeResult: # noqa: PLR6301
"""Layout."""
yield Markdown(_HELP_TEXT.strip(), id='text')
def action_close(self) -> None:
"""Close the dialog."""
self.dismiss()
Functions⚓︎
action_close ⚓︎
action_close()
Close the dialog.
Source code in tui_typer_tutor/screens/help.py
def action_close(self) -> None:
"""Close the dialog."""
self.dismiss()
compose ⚓︎
compose()
Layout.
Source code in tui_typer_tutor/screens/help.py
def compose(self) -> ComposeResult: # noqa: PLR6301
"""Layout."""
yield Markdown(_HELP_TEXT.strip(), id='text')