Beispiel #1
0
 def build(self):
     Window.toggle_fullscreen()
     Window.fullscreen = False
     self.icon = 'res/icons/logo.png'
     self.title = 'QubitLab'
     Window.clearcolor = (1, 1, 1, 1)
     return prep.screen_manager
Beispiel #2
0
 def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
     if keycode[1] == 'spacebar':
         Window.toggle_fullscreen()
     elif keycode[1] == 'tab':
         self.app.open_settings()
     elif keycode[1] == 'escape':
         quit()
     return True
Beispiel #3
0
    def _on_keyboard_down(self, keyboard, code_str, hex, others):
        code, key = code_str

        if key == 'f' and 'ctrl' in others:
            print("*" * 10)
            Window.toggle_fullscreen()
        elif key == 'spacebar':
            try:
                self.root.current_screen.spacebar_pressed()
            except Exception:
                Logger.info("Not in screen")

        if key == 'q' and not others:
            sys.exit(1)
Beispiel #4
0
    def _on_keyboard_down(self, keyboard, code_str, hex, others):
        code, key = code_str

        if key == 'f' and 'ctrl' in others:
            print("*" * 10)
            Window.toggle_fullscreen()
        elif key == 'spacebar':
            try:
                self.root.current_screen.spacebar_pressed()
            except Exception:
                Logger.info("Not in screen")

        if key == 'q' and not others:
            sys.exit(1)
Beispiel #5
0
 def on_config_change(self, config, section, key, value):
     if config is self.config:
         token = (section, key)
         if token == ('Sounds', 'Mute'):
             self.root.mute = (value == '1')
         elif token == ('Customization','Enable'):
             self.root.customize = (value == '1')
         elif token == ('Customization','C_Height'):
             self.root.customize_height = value
         elif token == ('Customization','C_Width'):
             self.root.customize_width = value
         elif token == ('Customization','Rate'):
             self.root.customize_rate = value
         elif token == ('Customization','FullScreen'):
             Window.toggle_fullscreen()
Beispiel #6
0
 def on_config_change(self, config, section, key, value):
     if config is self.config:
         token = (section, key)
         if token == ('Sounds', 'Mute'):
             self.root.mute = (value == '1')
         elif token == ('Customization', 'Enable'):
             self.root.customize = (value == '1')
         elif token == ('Customization', 'C_Height'):
             self.root.customize_height = value
         elif token == ('Customization', 'C_Width'):
             self.root.customize_width = value
         elif token == ('Customization', 'Rate'):
             self.root.customize_rate = value
         elif token == ('Customization', 'FullScreen'):
             Window.toggle_fullscreen()
Beispiel #7
0
    def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
        """ with this is possible to control to show/hidden the faces """
        if keycode[1] == 's' or keycode[1] == 'S':
            self.hide_faces()
            self.show_faces()
            self.navcolor = [1,1,1,1]
            Clock.unschedule(self._next_function)
            mouse.set_visible(True)
        if keycode[1] == 'h' or keycode[1] == 'H':
            self.hide_faces()
            self.navcolor = [1,1,1,0]
            Clock.schedule_once(self._next_function,settings.SECONDS_PER_IMAGE)
            mouse.set_visible(False)
        if keycode[1] == 'f' or keycode[1] == 'F':
            Window.toggle_fullscreen()

        return True
Beispiel #8
0
 def on_key_down(self, win, key, scancode, string, modifiers):
     if key == 292:
         Window.toggle_fullscreen()
         return True
Beispiel #9
0
 def win_max(self, *args):
     Window.grab_mouse()
     Window.toggle_fullscreen()
     self.m_fullscreen = True
Beispiel #10
0
 def toggle_fullscreen(self, *args):
     Window.toggle_fullscreen()