From 54be0ddc98854d29d1a9d49af00f2bf225dfe955 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Jul 2013 18:19:18 +0200 Subject: [PATCH] Explicitly pass touch events to child widgets (needed for kivy 1.7) --- erdslangetjie/localwidgets.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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) -- 2.34.1