From 3eecc98304f506cb0f786241f3d01ccbc8528891 Mon Sep 17 00:00:00 2001 From: Matteo Benedetto Date: Mon, 23 Dec 2024 16:56:36 +0100 Subject: [PATCH] Migliora la logica di scrolling degli assi nella classe KeyBindings --- engine/controls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/controls.py b/engine/controls.py index 300f2e9..43250ec 100644 --- a/engine/controls.py +++ b/engine/controls.py @@ -62,4 +62,4 @@ class KeyBindings: self.scrolling += 1 def axis_scroll(self, x, y): - self.scroll_cursor(bool(x)*1, bool(y)*1) \ No newline at end of file + self.scroll_cursor(1 if x > 0 else -1, 1 if y > 0 else -1) \ No newline at end of file