internal override bool Seize(Event currentEvent, ref Vector3 position, ref string message) { if (menu.Active) { menu.OnGui(currentEvent); BGEditorUtility.Assign(ref pointIndicatorTransition, () => new BGTransition.SwayTransition(20, 30, .4f)); BGSceneViewOverlay.DrawHandlesGuiTexture(menu.Point2DPosition, pointIndicatorTransition, BGBinaryResources.BGPointSelected123); var okMessage = menu.ActiveItem != null && menu.ActiveItem.Description != null ? "Release Ctrl to " + menu.ActiveItem.Description : "Hover over an option and release Ctrl."; //out params position = menu.Point3DPosition; message = BGSceneViewOverlay.ToOk(okMessage) + "\r\n" + menu.Details; //============== Ok return(true); } if (!(currentEvent.type == EventType.Repaint && currentEvent.control || currentEvent.type == EventType.MouseMove && currentEvent.control)) { return(false); } if (Process(currentEvent, overlay.Editor.Editor.Math, BGEditorUtility.GetSceneViewHeight(), ref position, ref message)) { return(true); } pointIndicatorTransition = null; //============== No luck return(false); }
public virtual void OnSceneGUI() { BGEditorUtility.Assign(ref pointIndicatorTransition, () => new BGTransition.SwayTransition(30, 30, 1)); BGSceneViewOverlay.DrawHandlesGuiTexture(BGEditorUtility.GetSceneViewPosition(point.PositionWorld), pointIndicatorTransition, pointSelectedTexture); curveEditor.OnSceneGUI(); // animation is off for now // SceneView.RepaintAll(); }