【发布时间】:2014-08-21 14:35:42
【问题描述】:
我检测到一个小部件上的双击,如 kivy 文档中所述。 如何以一种好的方式实现单击和双击的不同反应?
def on_touch_down(self, touch):
if self.collide_point(*touch.pos):
if touch.is_double_tap:
print('here start function B (but not function A in advance!)')
else:
print('here start function A')
return super(MyLabel, self).on_touch_down(touch)
【问题讨论】:
-
我目前面临同样的问题。你找到解决问题的方法了吗?谢谢你:)