예제 #1
0
    def on_touch_move(self, touch):
        # print "move"
        global xs, ys, xboun, yboun, wide
        if incanvasxy(self, touch.x, touch.y) and incanvasxy(self, xs, ys):
            self.col = retclr()
            if sline:
                if Widget.on_touch_move(self, touch):
                    return True
                with self.canvas.after:
                    self.canvas.after.clear()
                    # if skip > 5:
                    #   Color(*[0,0,0,1])
                    #  Line(points=(xp,yp,xs,ys),width=4)
                    Color(*self.col)
                    Line(points=(touch.x, touch.y, xs, ys), width=wide)
                xboun = touch.x
                yboun = touch.y
            elif rect:
                if Widget.on_touch_move(self, touch):
                    return True
                with self.canvas.after:
                    self.canvas.after.clear()
                    Color(*self.col)
                    Line(rectangle=(xs, ys, touch.x - xs, touch.y - ys), width=wide)
                xboun = touch.x
                yboun = touch.y

            else:
                if incanvasxy(self, xs, ys):
                    touch.ud["line"].points += [touch.x, touch.y]
        default(self)
예제 #2
0
파일: transform.py 프로젝트: 2xR/legacy
 def on_touch_move(self, touch):
     # if not self.collide_point(touch.x, touch.y):
     #     return False
     with touch_to_local(touch, self):
         if Widget.on_touch_move(self, touch):
             return True
         if len(self.touch_handlers) > 0:
             for handler in self.touch_handlers:
                 if handler.on_touch_move(touch):
                     return True
     return False
예제 #3
0
 def on_touch_move(self, touch):
     print("move!!!", touch)
     self.ball_list.make_balls(self, self.rocket, self.enemy_list,
                               [touch.x, touch.y])
     return Widget.on_touch_move(self, touch)
 def on_touch_move(self, touch):
     if not touch.is_mouse_scrolling:
         self.on_touch(touch)
     return Widget.on_touch_move(self, touch)
예제 #5
0
	def on_touch_move(self, touch):
		self.cursorpos=touch.pos;
		x, y = self.cursorpos
		self.cursor.pos=(x-40, y-40);
		Widget.on_touch_move(self, touch)
		self.on_air(touch)