Add controller exiting with B button

This commit is contained in:
csd4ni3l
2025-06-25 10:25:37 +02:00
parent 1780ab7e8d
commit 8c64751c96
2 changed files with 14 additions and 10 deletions

View File

@@ -66,9 +66,11 @@ class IterFractalViewer(arcade.gui.UIView):
self.has_controller = True
def on_button_press(self, controller, button_name):
if button_name == "a" and self.has_controller:
if button_name == "a":
self.zoom_start_position = self.cursor_sprite.center_x, self.cursor_sprite.center_y
self.dragging_with_controller = True
elif button_name == "b":
self.main_exit()
def on_button_release(self, controller, button_name):
if button_name == "a" and self.dragging_with_controller: