Research portable Memory game | Исследовать портируемую игру Память
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.

32 lines
816B

  1. import arcade
  2. from desktop_aux import *
  3. class desktop_Window(arcade.Window):
  4. def __init__(self, p):
  5. super().__init__(
  6. p.c.windowWidth,
  7. p.c.windowHeight,
  8. p.c.windowTitle,
  9. )
  10. self.antialiasing = p.c.windowAntialiasing
  11. self.background_color = arcade.color_from_hex_string(p.c.windowBackgroundColor)
  12. self.p = p
  13. def on_draw(self):
  14. arcade.start_render()
  15. self.p.descSprites.draw()
  16. self.p.deselectedSprites.draw()
  17. self.p.selectedSprites.draw()
  18. self.p.titleSprites.draw()
  19. def on_mouse_press(self, x, y, button, key_modifiers):
  20. id = desktop_aux_tileIdAt(self.p, x, y)
  21. if (
  22. id != None
  23. ):
  24. self.p.ctrl.set("selectedId", id)
  25. def on_update(self, delta):
  26. self.p.deselectedSprites.update_animation()
  27. self.p.sequentialTimer.update()