|
|
@@ -1,4 +1,5 @@ |
|
|
|
import arcade |
|
|
|
from desktop_aux import * |
|
|
|
|
|
|
|
class desktop_Window(arcade.Window): |
|
|
|
def __init__(self, p): |
|
|
@@ -16,10 +17,11 @@ class desktop_Window(arcade.Window): |
|
|
|
self.p.sprites.draw() |
|
|
|
|
|
|
|
def on_mouse_press(self, x, y, button, key_modifiers): |
|
|
|
print("click", x, y) |
|
|
|
sprites = arcade.get_sprites_at_point([x, y], self.p.sprites) |
|
|
|
id = sprites[0].guid |
|
|
|
print("selected id: ", id) |
|
|
|
id = desktop_aux_tileIdAt(self.p, x, y) |
|
|
|
if ( |
|
|
|
id != None |
|
|
|
): |
|
|
|
self.p.ctrl.set("selectedId", id) |
|
|
|
|
|
|
|
def on_update(self, delta): |
|
|
|
self.p.sprites.update_animation() |