public static void ShowItemContextMenu(Vector2 mousePosition, TimelineClip[] clips, IMarker[] markers) { var menu = new GenericMenu(); var items = new List <MenuActionItem>(); BuildItemContextMenu(items, mousePosition, clips, markers); MenuItemActionBase.BuildMenu(menu, items); menu.ShowAsContext(); }
public static void ShowNewTracksContextMenu(ICollection <TrackAsset> tracks, WindowState state) { var menu = new GenericMenu(); List <MenuActionItem> items = new List <MenuActionItem>(100); BuildNewTracksContextMenu(items, tracks, state); MenuItemActionBase.BuildMenu(menu, items); menu.ShowAsContext(); }
public static void ShowMarkerHeaderContextMenu(Vector2?mousePosition, WindowState state) { var menu = new GenericMenu(); List <MenuActionItem> items = new List <MenuActionItem>(100); BuildMarkerHeaderContextMenu(items, mousePosition, state); MenuItemActionBase.BuildMenu(menu, items); menu.ShowAsContext(); }
public static void ShowTrackContextMenu(TrackAsset[] tracks, Vector2?mousePosition) { if (tracks == null || tracks.Length == 0) { return; } var items = new List <MenuActionItem>(); var menu = new GenericMenu(); BuildTrackContextMenu(items, tracks, mousePosition); MenuItemActionBase.BuildMenu(menu, items); menu.ShowAsContext(); }