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.

23 lines
556 B

from miniworldmaker import *
board = TiledBoard()
t1 = Token((0,0))
t2 = Token((3,4))
t2.dragged = False
def on_mouse_left(self, mouse_pos):
if self.sensing_point(mouse_pos):
self.dragged = True
print("start drag")
def on_mouse_left_released(self, mouse_pos):
pos = board.get_board_position_from_pixel(mouse_pos)
if self.dragged:
self.position = pos
print("end drag")
self.dragged = False