uix.screenmanager: dont propagate touch event sduriong transition
This commit is contained in:
Thomas Hansen 2012-08-23 12:02:49 -05:00
parent 8429c70677
commit c3a0f48828
1 changed files with 16 additions and 1 deletions

View File

@ -224,7 +224,7 @@ class TransitionBase(EventDispatcher):
None, read-only. None, read-only.
''' '''
is_active = BooleanProperty() is_active = BooleanProperty(False)
'''Indicate if the transition is currently active '''Indicate if the transition is currently active
:data:`is_active` is a :class:`~kivy.properties.BooleanProperty`, default :data:`is_active` is a :class:`~kivy.properties.BooleanProperty`, default
@ -688,6 +688,21 @@ class ScreenManager(FloatLayout):
continue continue
child.pos = value child.pos = value
def on_touch_down(self, touch):
if self.transition.is_active:
return False
return super(ScreenManager, self).on_touch_down(touch)
def on_touch_move(self, touch):
if self.transition.is_active:
return False
return super(ScreenManager, self).on_touch_move(touch)
def on_touch_up(self, touch):
if self.transition.is_active:
return False
return super(ScreenManager, self).on_touch_up(touch)
if __name__ == '__main__': if __name__ == '__main__':
from kivy.app import App from kivy.app import App
from kivy.uix.button import Button from kivy.uix.button import Button