def __init__(self, ctl): super(Bugs, self).__init__(ctl) apply_styling_to_screen(self.css_path('bugs.css')) self._zapped = 0 self._total_bugs = 3
def __init__(self, start_from=None): """ :param start_from: Overrides the status and makes the init flow start from this stage. :type start_from: str """ super(MainWindow, self).__init__() self._ctl = Controller(self, start_from) self.connect("delete-event", Gtk.main_quit) self._child = None self._press_signal_id = None self._release_signal_id = None self._emergency_counter = 0 self._to_id_counter = 0 self._timeouts = [] apply_common_to_screen() apply_styling_to_screen(common_css_path('scene.css')) apply_styling_to_screen(common_css_path('speech_bubble.css')) self.set_decorated(False) screen = Gdk.Screen.get_default() width = screen.get_width() height = screen.get_height() self.set_size_request(width, height + 1) self.set_position(Gtk.WindowPosition.CENTER) overlay = Gtk.Overlay() self._child = Gtk.EventBox() overlay.add(self._child) self.add(overlay) self._container = overlay self._container.set_halign(Gtk.Align.CENTER) self._container.set_valign(Gtk.Align.CENTER) emergency_exit = Gtk.EventBox() emergency_exit.set_halign(Gtk.Align.START) emergency_exit.set_valign(Gtk.Align.START) emergency_exit.set_size_request(20, 20) emergency_exit.connect('button-release-event', self._emergency_exit_cb) overlay.add_overlay(emergency_exit) self.connect('key-release-event', self._key_emergency_exit) self.connect('key-release-event', self._key_skip_stage) if start_from: debug_button = Gtk.EventBox() debug_button.add(Gtk.Label('Close')) debug_button.set_halign(Gtk.Align.END) debug_button.set_valign(Gtk.Align.START) debug_button.connect('button-release-event', Gtk.main_quit) overlay.add_overlay(debug_button)
def __init__(self, ctl): super(LightLab, self).__init__(ctl) apply_styling_to_screen(self.css_path('light-lab.css'))
def __init__(self, ctl): super(Wifi, self).__init__(ctl) self._tries = 0 apply_styling_to_screen(self.css_path('console.css'))
def __init__(self, ctl): super(OverscanOld, self).__init__(ctl) self._overscan_ctl = OverscanControl() apply_styling_to_screen(self.css_path('overscan-old.css'))
def __init__(self, ctl): super(Intro, self).__init__(ctl) apply_styling_to_screen(self.css_path("intro.css"))
def __init__(self, ctl): super(Quests, self).__init__(ctl) apply_styling_to_screen(self.css_path('quests.css'))
def __init__(self, ctl): super(AudioLab, self).__init__(ctl) # Flag to check if the troubleshooting screen is open self._troubleshooting_open = False apply_styling_to_screen(self.css_path('audio-lab.css'))
def __init__(self, ctl): super(Wardrobe, self).__init__(ctl) apply_styling_to_screen(self.css_path("wardrobe.css"))