def __init__(self, _win): self.win = _win # check for monitor if is_monitor(): self.win.exit_flow() return self.win.set_resizable(True) # Change background change_wallpaper(MEDIA_DIR, "/Display-Test") # Create UI self.template = Template( img_path=os.path.join(MEDIA_DIR, "display_test.png"), title="Can you see four white lines?", description="They should be touching each side of your screen.", button1_text="YES", button2_text="NO" ) self.template.kano_button2.set_color("red") self.template.kano_button.connect("button_release_event", self.next_screen) self.template.kano_button.connect("key_release_event", self.next_screen) self.template.kano_button2.connect("button_release_event", self.tutorial_screen) self.template.kano_button2.connect("key_release_event", self.tutorial_screen) self.win.set_main_widget(self.template) # Make the kano button grab the focus self.template.kano_button.grab_focus() self.win.show_all()
def first_scene(self): if is_monitor(): self._ctl.next_stage() return track_action('init-flow-overscan-needed') s1 = self._setup_first_scene() self._ctl.main_window.push(s1)
def first_scene(self): # Check if the pi is connected to a monitor if is_monitor(): self._ctl.next_stage() return s = self._setup_first_scene() self._ctl.main_window.push(s)