public static RiderFlowEditorToolbarToggle MakeVisualElement(this SceneSearchPopupTool tool, Lifetime lifetime) { var button = new SceneSearchToggle(tool, lifetime); return(button); }
public SceneSearchToggle(SceneSearchPopupTool tool, Lifetime lifetime) { myTool = tool; name = "CameraPresetExplorer"; icon = tool.Icon; tooltip = tool.ToolTip; lifetime.OnTermination(() => myTool.CloseWindow()); }