You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
573 B
15 lines
573 B
from tkinter import Canvas |
|
|
|
class OrderClick: |
|
def __init__(self, position, color="green"): |
|
self.color = color |
|
self.position = position |
|
self.radius= 25 |
|
def next_frame(self, canvas: Canvas) -> bool: |
|
self.radius -= 5 |
|
shift = 30 |
|
canvas.create_oval(self.position[0]-self.radius, self.position[1]-self.radius/2+shift, self.position[0]+self.radius, self.position[1]+self.radius/2+shift, fill="", tags="effect", outline=self.color, width=2) |
|
|
|
if not self.radius: |
|
return False |
|
return True |