1 from components import *
6 screen["clock"] = Clock()
8 class Screen(dict, HTMLSkin, GUISkin):
11 # never call this directly - it will be called from the session!
15 def close(self, retval=None):
19 class testDialog(Screen):
20 def testDialogClick(self):
21 selection = self["menu"].getCurrent()
25 self.session.open(screens["mainMenu"]())
29 self["title"].setText("EMUs ARE ILLEGAL AND NOT SUPPORTED!")
31 def goTimeshift(self):
33 self["title"].setText("JUST PRESS THE YELLOW BUTTON!")
37 self["title"].setText("HDTV GREEN FLASHES: ENABLED")
40 self.session.open(screens["clockDisplay"](Clock()))
43 GUISkin.__init__(self)
45 b.onClick = [ self.testDialogClick ]
47 self["title"] = Header("Test Dialog - press ok to leave!")
48 self["menu"] = MenuList(
50 ("MAIN MENU", self.goMain),
51 ("EMU SETUP", self.goEmu),
52 ("TIMESHIFT SETUP", self.goTimeshift),
53 ("HDTV PIP CONFIG", self.goHDTV),
54 ("wie spaet ists?!", self.goClock)
57 class mainMenu(Screen):
59 GUISkin.__init__(self)
61 self["title"] = Header("this is the\nMAIN MENU !!!");
62 self["okbutton"] = Button("ok")
63 self["okbutton"].onClick = [ self.close ]
66 # a clock display dialog
67 class clockDisplay(Screen):
71 def __init__(self, clock):
72 GUISkin.__init__(self)
73 self["theClock"] = clock
75 b.onClick = [ self.okbutton ]
77 self["title"] = Header("clock dialog: here you see the current uhrzeit!")
79 # defined screens (evtl. kann man sich das sparen, ich seh den sinn gerade nicht mehr)
82 "testDialog": testDialog,
83 "clockDisplay": clockDisplay ,
84 "mainMenu": mainMenu }