comparison cagou/core/menu.py @ 173:5cf17930bb09

menu (transfer): changed transfer menu effect
author Goffi <goffi@goffi.org>
date Mon, 30 Apr 2018 07:54:47 +0200
parents 397f2fb67aab
children c63922860f80
comparison
equal deleted inserted replaced
172:7103655647aa 173:5cf17930bb09
202 202
203 def show(self, caller_wid=None): 203 def show(self, caller_wid=None):
204 self.size_hint_y = 0 204 self.size_hint_y = 0
205 Window.bind(on_keyboard=self.key_input) 205 Window.bind(on_keyboard=self.key_input)
206 G.host.app.root.add_widget(self) 206 G.host.app.root.add_widget(self)
207 Animation(size_hint_y=0.5, d=2, t='out_elastic').start(self) 207 Animation(size_hint_y=0.5, d=0.3, t='out_back').start(self)
208 208
209 def hide(self): 209 def hide(self):
210 Window.unbind(on_keyboard=self.key_input) 210 Window.unbind(on_keyboard=self.key_input)
211 anim = Animation(size_hint_y=0, d=0.3) 211 anim = Animation(size_hint_y=0, d=0.2)
212 anim.bind(on_complete=lambda anim, menu: self.parent.remove_widget(self)) 212 anim.bind(on_complete=lambda anim, menu: self.parent.remove_widget(self))
213 anim.start(self) 213 anim.start(self)
214 214
215 def on_touch_down(self, touch): 215 def on_touch_down(self, touch):
216 # we remove the menu if we click outside 216 # we remove the menu if we click outside