+class Screen(Widget):
+
+ BACKGROUND = None
+ START = 'Start'
+
+ def __init__(self, app):
+ super(Screen, self).__init__()
+ self.image = load_image(self.BACKGROUND)
+ self.app = app
+ with self.canvas:
+ Rectangle(pos=(0, 0), size=(1026, 760),
+ texture=self.image.texture)
+
+ self.stop_button = Label(
+ text='[ref=quit][color=ff0066]Quit[/color][/ref]',
+ font_size=30,
+ markup=True,
+ size=(200, 40),
+ pos=((1026 - 200) / 2 - 100, 100))
+ self.stop_button.bind(on_ref_press=self.app.stop_app)
+ self.start_button = Label(
+ text="[ref=start][color=00ff66]%s[/color][/ref]" % self.START,
+ font_size=30,
+ markup=True, size=(200, 40),
+ pos=((1026 - 200) / 2 + 100, 100))
+ self.start_button.bind(on_ref_press=self.app.start_game)
+ self.add_widget(self.stop_button)
+ self.add_widget(self.start_button)
+
+
+class IntroScreen(Screen):
+
+ BACKGROUND = 'screens/intro_screen.png'
+ START = 'Start the Game'
+
+
+class WonScreen(Screen):
+
+ BACKGROUND = 'screens/won.png'
+ START = 'Play again?'
+
+
+class LostScreen(Screen):
+
+ BACKGROUND = 'screens/lost.png'
+ START = 'Retry?'
+
+