From: Neil Date: Wed, 17 Jul 2013 16:19:18 +0000 (+0200) Subject: Explicitly pass touch events to child widgets (needed for kivy 1.7) X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=54be0ddc98854d29d1a9d49af00f2bf225dfe955;p=erdslangetjie.git Explicitly pass touch events to child widgets (needed for kivy 1.7) --- diff --git a/erdslangetjie/localwidgets.py b/erdslangetjie/localwidgets.py index 885ac51..fe719be 100644 --- a/erdslangetjie/localwidgets.py +++ b/erdslangetjie/localwidgets.py @@ -361,6 +361,17 @@ class LostScreen(Screen): START = 'Retry?' +class MyScrollView(ScrollView): + + def on_touch_down(self, touch): + for child in self.children: + child.on_touch_down(touch) + + def on_touch_up(self, touch): + for child in self.children: + child.on_touch_up(touch) + + class GameApp(App): title = "Bane's Befuddlement" @@ -400,7 +411,7 @@ class GameApp(App): self.config, data=config_json) def build(self): - root = ScrollView(size_hint=(None, None)) + root = MyScrollView(size_hint=(None, None)) level_name = self.config.getdefault('bane', 'start_level', None) if level_name: self.levels.set_level_to(level_name)