Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pysollib/kivy/LApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):

Expand Down Expand Up @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions pysollib/kivy/tkcanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!!).

Expand Down