Bugfixing und einige Platzhalterseiten mit Daten gefüllt

This commit is contained in:
2025-10-07 11:19:08 +02:00
parent e7a2f4bb54
commit f969df8cb8
11 changed files with 146 additions and 84 deletions

22
pages/unknown.py Normal file
View File

@@ -0,0 +1,22 @@
"""
Fehlerseite
"""
import os
import cairo
from .page import Page
class Unknown(Page):
def __init__(self, pageno, cfg, appdata, boatdata):
super().__init__(pageno, cfg, appdata, boatdata)
self.bgimg = cairo.ImageSurface.create_from_png(os.path.join(cfg['imgpath'], "unknown.png"))
def draw(self, ctx):
ctx.select_font_face("AtariST8x16SystemFont")
ctx.set_font_size(16)
self.draw_text_center(ctx, 200, 230, "Here be dragons")
ctx.save()
ctx.set_source_surface(self.bgimg, 140, 80)
ctx.paint()
ctx.restore()