Tests examples for the miniworldmaker engine https://www.miniworldmaker.de
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.
 
 

19 lines
423 B

from miniworldmaker import *
board = Board(200, 200)
circle = Circle((30, 30), 60)
circle.direction = 90
circle.dragged = False
@circle.register
def on_mouse_left(self, mouse_pos):
if self.sensing_point(mouse_pos):
self.dragged = True
@circle.register
def on_mouse_left_released(self, mouse_pos):
if self.dragged:
self.dragged = False
self.center = mouse_pos
board.run()