示例#1
0
    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
示例#2
0
    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
示例#3
0
    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)
示例#4
0
    def __init__(self, ctl):
        super(LightLab, self).__init__(ctl)

        apply_styling_to_screen(self.css_path('light-lab.css'))
示例#5
0
    def __init__(self, ctl):
        super(Wifi, self).__init__(ctl)

        self._tries = 0
        apply_styling_to_screen(self.css_path('console.css'))
示例#6
0
    def __init__(self, ctl):
        super(OverscanOld, self).__init__(ctl)

        self._overscan_ctl = OverscanControl()

        apply_styling_to_screen(self.css_path('overscan-old.css'))
示例#7
0
 def __init__(self, ctl):
     super(Intro, self).__init__(ctl)
     apply_styling_to_screen(self.css_path("intro.css"))
示例#8
0
    def __init__(self, ctl):
        super(Quests, self).__init__(ctl)

        apply_styling_to_screen(self.css_path('quests.css'))
示例#9
0
    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'))
示例#10
0
 def __init__(self, ctl):
     super(Wardrobe, self).__init__(ctl)
     apply_styling_to_screen(self.css_path("wardrobe.css"))
示例#11
0
 def __init__(self, ctl):
     super(Wardrobe, self).__init__(ctl)
     apply_styling_to_screen(self.css_path("wardrobe.css"))
示例#12
0
    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'))
示例#13
0
 def __init__(self, ctl):
     super(Intro, self).__init__(ctl)
     apply_styling_to_screen(self.css_path("intro.css"))
示例#14
0
    def __init__(self, ctl):
        super(Quests, self).__init__(ctl)

        apply_styling_to_screen(self.css_path('quests.css'))