Bugfixing und einige Platzhalterseiten mit Daten gefüllt
This commit is contained in:
22
pages/unknown.py
Normal file
22
pages/unknown.py
Normal 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()
|
||||
Reference in New Issue
Block a user