Verified Commit f10a16e4 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add Hello World implementation of Idle scene

parent 6354ef37
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
from dataclasses import dataclass
from typing import cast

from poolpay.display.PygameDisplay import PygameDisplay
from poolpay.ui.scenes.Idle import Idle as IdleBase


@dataclass(frozen=True)
class Idle(IdleBase):
    def present(self) -> None:
        # TODO Add actual UI
        pygame.font.init()
        defaultFont = pygame.font.SysFont(None, 30)
        display = cast(PygameDisplay, self.director.display)
        display.surface.fill((128, 128, 128))
        display.surface.blit(
            defaultFont.render("Hello World!", False, (0, 0, 0)), (0, 0)
        )
        display.refresh()