mirror of https://github.com/JoshKarpel/spiel
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
from typing import ClassVar, List, Tuple
|
|
|
|
from textual.app import ComposeResult
|
|
from textual.binding import Binding
|
|
from textual.containers import Container
|
|
|
|
from spiel.screens.screen import SpielScreen
|
|
from spiel.widgets.bindings import AppBindingsTableWidget, ScreenBindingsTableWidget
|
|
from spiel.widgets.footer import Footer
|
|
|
|
|
|
class HelpScreen(SpielScreen):
|
|
DEFAULT_CSS = """
|
|
.h-section {
|
|
layout: horizontal;
|
|
height: auto;
|
|
align: center top;
|
|
content-align: center top;
|
|
}
|
|
"""
|
|
|
|
BINDINGS: ClassVar[List[Binding | Tuple[str, str, str]]] = [
|
|
Binding("escape,enter", "pop_screen", "Return to the previous view."),
|
|
]
|
|
|
|
def compose(self) -> ComposeResult:
|
|
yield Container(
|
|
AppBindingsTableWidget(),
|
|
classes="h-section",
|
|
)
|
|
yield Container(
|
|
ScreenBindingsTableWidget(id="slide"),
|
|
ScreenBindingsTableWidget(id="deck"),
|
|
classes="h-section",
|
|
)
|
|
yield Container(
|
|
ScreenBindingsTableWidget(id="help"),
|
|
classes="h-section",
|
|
)
|
|
yield Footer()
|