Ejemplo n.º 1
0
 def key_down(self, key, scancode=None, *_):
     if scancode == 281:  # PAGE_DOWN
         print("PAGE_DOWN pressed")
         ConjugationGame.change_game_state(self.root)
     elif scancode == 280:  # PAGE_UP
         print("PAGE_UP pressed")
         ConjugationGame.revert_game_state(self.root)
     elif scancode == 98:  # B
         print("B pressed")
         ConjugationGame.change_round(self.root)
     elif scancode == 115:  # S
         App.open_settings(self)
     else:
         print("\nKey: {} (scancode {}) pressed".format(_[1], scancode))
Ejemplo n.º 2
0
 def open_settings(self, *largs):
     """
     Creates the settings panel (framework function)
     :param largs:
     :return:
     """
     if Globals.oWinOrcaSettings is None:
         return App.open_settings(self, *largs)
     return False
Ejemplo n.º 3
0
    def build(self):
        self.settings_cls = MySettingsWithTabbedPanel
        self.have_serial = 0
        platform_type = platform.platform()
        Logger.info("platform - {0}".format(platform_type))
        if 'Windows-10' in platform_type:
            self.wind10 = True
        else:
            self.wind10 = False

        self.layout.cols = 2
        find_button = Button(text='подключить')
        find_button.size_hint_x = None
        find_button.bind(on_press=lambda j: self.find_device())
        self.connect_status = CheckBox(active=False, group="money")
        self.rtc = TextInput(text='текущее время 0:0:0 \n')
        read_time_button = Button(text='прочитать время')
        read_time_button.size_hint_x = None
        read_time_button.bind(on_press=lambda j: self.read_time(self.ser))
        sync_time_button = Button(text='синхронизировать время')
        sync_time_button.size_hint_x = None
        sync_time_button.bind(on_press=lambda j: self.sync_time(self.ser))
        change_settings_button = Button(text='редактировать настройки')
        change_settings_button.size_hint_x = None
        change_settings_button.bind(on_press=lambda j: App.open_settings(self))
        write_settings_button = Button(text='записать настройки')
        write_settings_button.size_hint_x = None
        write_settings_button.bind(on_press=lambda j: self.write_settings())
        read_settings_button = Button(text='прочитать настройки')
        read_settings_button.size_hint_x = None
        read_settings_button.bind(on_press=lambda j: self.read_settings())
        self.layout.add_widget(find_button)
        self.layout.add_widget(read_time_button)
        self.layout.add_widget(sync_time_button)
        self.layout.add_widget(change_settings_button)
        self.layout.add_widget(write_settings_button)
        self.layout.add_widget(read_settings_button)
        self.layout.add_widget(self.rtc)
        self.layout.add_widget(self.connect_status)
        return self.layout
Ejemplo n.º 4
0
 def open_settings(self):
     App.open_settings()
Ejemplo n.º 5
0
	def show_config(self):
		App.open_settings(self)
		Window.request_keyboard(self.keyboard_close, self)
Ejemplo n.º 6
0
 def open_settings(self):
     App.open_settings()
Ejemplo n.º 7
0
 def on_press(self):
     app = App.get_running_app()
     App.open_settings(app)