|
|
@ -5,6 +5,7 @@ from textual.widgets import Header, Footer, Input, Label, Static, Button
|
|
|
|
from textual.message import Message
|
|
|
|
from textual.message import Message
|
|
|
|
from textual.color import Color
|
|
|
|
from textual.color import Color
|
|
|
|
from textual.containers import Horizontal
|
|
|
|
from textual.containers import Horizontal
|
|
|
|
|
|
|
|
from textual.validation import Number
|
|
|
|
|
|
|
|
|
|
|
|
from asyncio import sleep
|
|
|
|
from asyncio import sleep
|
|
|
|
|
|
|
|
|
|
|
@ -69,12 +70,17 @@ class BingoApp(App):
|
|
|
|
class BingoDisplay(Static):
|
|
|
|
class BingoDisplay(Static):
|
|
|
|
def compose(self) -> ComposeResult:
|
|
|
|
def compose(self) -> ComposeResult:
|
|
|
|
"""Create child widgets for the app."""
|
|
|
|
"""Create child widgets for the app."""
|
|
|
|
yield BingoBoard()
|
|
|
|
self.board = BingoBoard()
|
|
|
|
|
|
|
|
yield self.board
|
|
|
|
input_field = Input(
|
|
|
|
input_field = Input(
|
|
|
|
|
|
|
|
str(self.board.seed),
|
|
|
|
type='integer',
|
|
|
|
type='integer',
|
|
|
|
placeholder='UNIX timestamp',
|
|
|
|
placeholder='UNIX timestamp',
|
|
|
|
max_length=10,
|
|
|
|
max_length=10,
|
|
|
|
classes='seed_input'
|
|
|
|
classes='seed_input',
|
|
|
|
|
|
|
|
validators=[
|
|
|
|
|
|
|
|
Number(minimum=1000000000, maximum = int(datetime.now().timestamp()))
|
|
|
|
|
|
|
|
]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
input_field.border_title = 'Seed'
|
|
|
|
input_field.border_title = 'Seed'
|
|
|
|
yield Horizontal(
|
|
|
|
yield Horizontal(
|
|
|
|