def _on_wheel(self, evt: wx.MouseEvent): """Add scroll wheel behaviour to the input.""" rotation = evt.GetWheelRotation() ctrl = evt.GetEventObject() if rotation > 0: ctrl.SetValue(ctrl.GetValue() + ctrl.GetIncrement()) self._changed(ctrl) elif rotation < 0: ctrl.SetValue(ctrl.GetValue() - ctrl.GetIncrement()) self._changed(ctrl)
def OnMouseWheel(self, event: wx.MouseEvent): if self.selection_mode: return self.camera_interactor.mouse_wheel(event.GetWheelRotation(), event.GetWheelDelta(), event.ShiftDown(), event.AltDown(), event.ControlDown()) self._x = self._y = -1 self.Sync() self.Refresh()