GravBox.py 文件源码

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

项目:GravBox 作者: GravBoxInterface 项目源码 文件源码
def on_touch_down(self, touch):

        with self.canvas:

            if touch.x > self.x_bounds:
                self.out_of_bounds = True
                #print ('Touch down event out of bounds with x > %s \n' %(self.x_bounds))
                pass            

            elif touch.x < self.x_bounds:
                self.canvas.clear()
                d = 10
                Ellipse(pos=(touch.x - d/2, touch.y - d/2), size=(d,d))
                touch.ud['line'] = Line(points=(touch.x, touch.y))
                #self.vector_length(touch.ud['line'])
                self.x_initial = touch.x
                self.y_initial = touch.y
                self.out_of_bounds = False
                print ('This is the initial x value: %s, \nThis is the initial y value: %s \n\n' %(self.x_initial, self.y_initial))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号