def _start_drag(self, evt=None):  # pylint: disable=unused-argument
        """ Gets called when the user starts dragging the window """
        self._dragging = True
        self._node.detach_node()
        self._node.reparent_to(self._parent)
        Globals.base.taskMgr.add(self._on_tick, "UIWindowDrag", uponDeath=self._stop_drag)
        self._drag_offset = self._pos - self._get_mouse_pos()
 Gets called when the user starts dragging the window 
metadrive/render_pipeline/rpcore/gui/draggable_window.py