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..c24a7b273 100644 --- a/pysollib/kivy/tkcanvas.py +++ b/pysollib/kivy/tkcanvas.py @@ -921,14 +921,9 @@ 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. def showAllItems(self): print('MfxCanvas: showAllItems') - # TBD - # Brauchts darum auch nicht. # Erweiterungen fuer Tk Canvas (prüfen was noch nötig!!).