Пример #1
0
            class DummyTkWin(object):
                def __init__(self):
                    self.tkKeyboard = Keyboard()
                    self.ev = ""
                    self.key = ""
                    self.winx, self.winy = 0, 0
                    self.width, self.height = 1920, 1180
                    self.event_list = []

                def update(self):
                    if PLATFORM == PLATFORM_WINDOWS or pi3d.USE_PYGAME:  #uses pygame UI
                        k = self.tkKeyboard.read()
                        if k == -1:
                            self.key = ""
                            self.ev = ""
                        else:
                            if k == 27:
                                self.key = "Escape"
                            else:
                                self.key = chr(k)
                            self.ev = "key"
                    else:
                        self.key = self.tkKeyboard.read_code()
                        if self.key == "":
                            self.ev = ""
                        else:
                            self.ev = "key"
Пример #2
0
      class DummyTkWin(object):
        def __init__(self):
          self.tkKeyboard = Keyboard()
          self.ev = ""
          self.key = ""
          self.winx, self.winy = 0, 0
          self.width, self.height = 1920, 1180
          self.event_list = []

        def update(self):
          if pi3d.PLATFORM == pi3d.PLATFORM_WINDOWS or pi3d.USE_PYGAME: #uses pygame UI
            k = self.tkKeyboard.read()
            if k == -1:
              self.key = ""
              self.ev = ""
            else:
              if k == 27:
                self.key = "Escape"
              else:
                self.key = chr(k)
              self.ev = "key"
          else:
            self.key = self.tkKeyboard.read_code()
            if self.key == "":
              self.ev = ""
            else:
              self.ev = "key"
Пример #3
0
            class DummyTkWin(object):
                def __init__(self):
                    self.tkKeyboard = Keyboard()
                    self.ev = ""
                    self.key = ""
                    self.winx, self.winy = 0, 0
                    self.width, self.height = 1920, 1180
                    self.event_list = []

                def update(self):
                    self.key = self.tkKeyboard.read_code()
                    if self.key == "":
                        self.ev = ""
                    else:
                        self.ev = "key"
Пример #4
0
      class DummyTkWin(object):
        def __init__(self):
          self.tkKeyboard = Keyboard()
          self.ev = ""
          self.key = ""
          self.winx, self.winy = 0, 0
          self.width, self.height = 1920, 1180
          self.event_list = []

        def update(self):
          self.key = self.tkKeyboard.read_code()
          if self.key == "":
            self.ev = ""
          else:
            self.ev = "key"