commandCentre.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:SpaceBorgOne 作者: piborg 项目源码 文件源码
def AnimatedSend(self):
        waited = (time.time() - self.animStartTime) * 1000
        if waited < TRANSMISSION_LAG_MS:
            # Load the next frame
            if self.frame >= len(self.gifFrames):
                self.frame = 0
            self.imgSend = self.gifFrames[self.frame].resize(self.animSize, Image.ANTIALIAS)
            self.itkSend = ImageTk.PhotoImage(self.imgSend)
            self.picSend.delete('IMG')
            self.picSend.create_image(0, 0, image = self.itkSend, anchor = Tkinter.NW, tags = 'IMG')
            self.frame += 1
            # Wait for animation step
            delay = int(100 - ((time.time() - self.animLastFrame) * 1000))
            if delay < 0:
                delay = 0
            self.animLastFrame = time.time()
            self.after(delay, self.AnimatedSend)
        else:
            # End the animation. transmit the command
            self.picSend.place_forget()
            SendOnly(self.animCommand)

    # Start the transmission animation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号