Esempio n. 1
0
 def create_draggable_element(self, widgetname, touch):
     # create the element, and make it draggable until the touch is released
     # search default args if exist
     default_args = {}
     for options in widgets:
         if len(options) > 2:
             default_args = options[2]
     widget = getattr(Factory, widgetname)(**default_args)
     container = PlaygroundDragElement(playground=self.root.playground)
     container.add_widget(widget)
     touch.grab(container)
     self.root.add_widget(container)