From 903dd675c2369ccba8798fabf246663f70dc5730 Mon Sep 17 00:00:00 2001 From: brandon wright <33914549+bwrightkc@users.noreply.github.com> Date: Fri, 17 Jul 2026 10:47:43 -0500 Subject: [PATCH 1/2] Block card input while paused on Android/Kivy Pause froze the elapsed-time counter but never stopped touch input, so cards could still be dragged and moves counted while paused, letting a run finish with a 0.00 time. LImageItem now checks game.pause before handling touch down/up. --- pysollib/kivy/LApp.py | 14 ++++++++++++++ pysollib/kivy/tkcanvas.py | 9 ++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pysollib/kivy/LApp.py b/pysollib/kivy/LApp.py index cbd9f4a54..aa09d8bc5 100644 --- a/pysollib/kivy/LApp.py +++ b/pysollib/kivy/LApp.py @@ -763,6 +763,14 @@ def get_image_type(self): LB241111. ''' + def _is_paused(self): + if self.game is not None: + return bool(self.game.pause) + lapp = App.get_running_app() + app = getattr(lapp, 'app', None) + game = getattr(app, 'game', None) + return bool(game and game.pause) + def send_event_pressed_n(self, event, n): r = EVENT_PROPAGATE if self.group and n in self.group.bindings: @@ -788,6 +796,9 @@ def send_event_pressed(self, touch, event): def on_touch_down(self, touch): + if self._is_paused(): + return False + # print('LCardImage: size = %s' % self.size) if self.collide_point(*touch.pos): @@ -847,6 +858,9 @@ def on_touch_up(self, touch): touch.ungrab(self) return True + if self._is_paused(): + return False + if self.collide_point(*touch.pos): if (self.game): diff --git a/pysollib/kivy/tkcanvas.py b/pysollib/kivy/tkcanvas.py index 3550ab3fd..b3651db51 100644 --- a/pysollib/kivy/tkcanvas.py +++ b/pysollib/kivy/tkcanvas.py @@ -921,14 +921,13 @@ def setTopImage(self, image, cw=0, ch=0): def hideAllItems(self): print('MfxCanvas: hideAllItems') - # TBD - # Wir lassen das. Das TopImage deckt alles ab. Spielen ist - # nicht möglich. + # No-op here: the pause overlay (setTopImage) does not consume + # touch events on its own, so blocking input during pause is + # handled in LImageItem.on_touch_down/on_touch_up (LApp.py). def showAllItems(self): print('MfxCanvas: showAllItems') - # TBD - # Brauchts darum auch nicht. + # See hideAllItems above. # Erweiterungen fuer Tk Canvas (prüfen was noch nötig!!). From d74a937a292f8be3c5359a08c6014ec5ca7c2f99 Mon Sep 17 00:00:00 2001 From: brandon wright <33914549+bwrightkc@users.noreply.github.com> Date: Fri, 17 Jul 2026 13:52:35 -0500 Subject: [PATCH 2/2] fixes --- pysollib/kivy/tkcanvas.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pysollib/kivy/tkcanvas.py b/pysollib/kivy/tkcanvas.py index b3651db51..c24a7b273 100644 --- a/pysollib/kivy/tkcanvas.py +++ b/pysollib/kivy/tkcanvas.py @@ -921,13 +921,9 @@ def setTopImage(self, image, cw=0, ch=0): def hideAllItems(self): print('MfxCanvas: hideAllItems') - # No-op here: the pause overlay (setTopImage) does not consume - # touch events on its own, so blocking input during pause is - # handled in LImageItem.on_touch_down/on_touch_up (LApp.py). def showAllItems(self): print('MfxCanvas: showAllItems') - # See hideAllItems above. # Erweiterungen fuer Tk Canvas (prüfen was noch nötig!!).