def _update(self, timeSinceLastFrame): """Updates mode """ if FlyMode.isActive(self): FlyMode._update(self,timeSinceLastFrame); # if self.vis_menu.isShow(): sel_objects = self._logic._getSheet().getSelected() n = len(sel_objects) if n == 1: obj = sel_objects[0] self.vis_menu.move(render_engine.pos3dTo2dWindow(sel_objects[0].getPosition())) self.vis_menu._update(timeSinceLastFrame)
def __init__(self, _logic): FlyMode.__init__(self, _logic) # highlighted object self._shift = False self._ctrl = False self.highlighted_obj = None # widgets self.type_combo = None self.content_combo = None # object we worked on in current state self.object_active = None # current mouse position self.mouse_pos = (0, 0) # # object we worked on in previous state # self.object_prev = none # visual menu self.vis_menu = None self._createVisualMenu()
def activate(self): """Activation message """ FlyMode.activate(self) self._updateVisualMenu()
def deactivate(self): """Deactivation message """ FlyMode.deactivate(self) self._updateVisualMenu()
def __del__(self): FlyMode.__del__(self)