public void EnterCutsceneEditor(SerializableCutscene cutscene) { Markers = new List <TimeMarker>(); Editor.Editor.CameraClampMax = 30f; CurrentCutscene = cutscene; IsInCutsceneEditor = true; if (cutscene.Cameras != null) { foreach (var camera in cutscene.Cameras) { Markers.Add(new CameraMarker() { Time = camera.PositionInTime, CameraPos = camera.Position, CameraRot = camera.Rotation, Interpolation = camera.InterpolationStyle, }); } } if (cutscene.Subtitles != null) { foreach (var subtitle in cutscene.Subtitles) { Markers.Add(new SubtitleMarker() { Content = subtitle.Content, Duration = subtitle.DurationInMs, Time = subtitle.PositionInTime, }); } } CurrentTimestamp = 0; MarkerMenu = new TimelineMarkerMenu(this); MarkerMenu.Visible = true; MarkerMenu.BuildFor(Markers.FirstOrDefault(m => m.Time == CurrentTimestamp)); MarkerMenu.OnMenuClose += sender => { LeaveCutsceneEditor(); }; }
public CutsceneUi() { #region NativeUI Init { CutsceneMenus = new UIMenu("Cutscene Creator", "CUTSCENES"); CutsceneMenus.MouseControlsEnabled = false; CutsceneMenus.ResetKey(Common.MenuControls.Up); CutsceneMenus.ResetKey(Common.MenuControls.Down); CutsceneMenus.SetKey(Common.MenuControls.Up, GameControl.CellphoneUp, 0); CutsceneMenus.SetKey(Common.MenuControls.Down, GameControl.CellphoneDown, 0); MarkerMenu = new TimelineMarkerMenu(this); EditCutsceneMenu = new EditCutsceneMenu(this); EditCutsceneMenu.ParentMenu = CutsceneMenus; } #endregion _children = new List<UIMenu>(); }
public CutsceneUi() { #region NativeUI Init { CutsceneMenus = new UIMenu("Cutscene Creator", "CUTSCENES"); CutsceneMenus.MouseControlsEnabled = false; CutsceneMenus.ResetKey(Common.MenuControls.Up); CutsceneMenus.ResetKey(Common.MenuControls.Down); CutsceneMenus.SetKey(Common.MenuControls.Up, GameControl.CellphoneUp, 0); CutsceneMenus.SetKey(Common.MenuControls.Down, GameControl.CellphoneDown, 0); MarkerMenu = new TimelineMarkerMenu(this); EditCutsceneMenu = new EditCutsceneMenu(this); EditCutsceneMenu.ParentMenu = CutsceneMenus; } #endregion _children = new List <UIMenu>(); }
public void EnterCutsceneEditor(SerializableCutscene cutscene) { Markers = new List<TimeMarker>(); Editor.Editor.CameraClampMax = 30f; CurrentCutscene = cutscene; IsInCutsceneEditor = true; if(cutscene.Cameras != null) foreach (var camera in cutscene.Cameras) { Markers.Add(new CameraMarker() { Time = camera.PositionInTime, CameraPos = camera.Position, CameraRot = camera.Rotation, Interpolation = camera.InterpolationStyle, }); } if(cutscene.Subtitles != null) foreach (var subtitle in cutscene.Subtitles) { Markers.Add(new SubtitleMarker() { Content = subtitle.Content, Duration = subtitle.DurationInMs, Time = subtitle.PositionInTime, }); } CurrentTimestamp = 0; MarkerMenu = new TimelineMarkerMenu(this); MarkerMenu.Visible = true; MarkerMenu.BuildFor(Markers.FirstOrDefault(m => m.Time == CurrentTimestamp)); MarkerMenu.OnMenuClose += sender => { LeaveCutsceneEditor(); }; }