private void UpdateTackTitle(TackPoint tackPoint) { var newTitle = EditorGUILayout.TextField("title", tackPoint.title); if (newTitle != tackPoint.title) { tackPoint.BeforeSave(); tackPoint.title = newTitle; tackPoint.Save(); } }
public void AddNewTackToEmptyFrame(int frame) { var newTackPoint = new TackPoint( tackPoints.Count, TimeFlowShikiGUISettings.DEFAULT_TACK_NAME, frame, TimeFlowShikiGUISettings.DEFAULT_TACK_SPAN ); tackPoints.Add(newTackPoint); ApplyTextureToTacks(index); }
private List <ScoreComponent> LoadScores(Dictionary <string, object> deserialized) { var newScores = new List <ScoreComponent>(); var scoresList = deserialized[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_SCORES] as List <object>; foreach (var score in scoresList) { var scoreDict = score as Dictionary <string, object>; var scoreId = scoreDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_SCORE_ID] as string; var scoreTitle = scoreDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_SCORE_TITLE] as string; var scoreTimelines = scoreDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_SCORE_TIMELINES] as List <object>; var currentTimelines = new List <TimelineTrack>(); foreach (var scoreTimeline in scoreTimelines) { var scoreTimelineDict = scoreTimeline as Dictionary <string, object>; var timelineTitle = scoreTimelineDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_TIMELINE_TITLE] as string; var timelineTacks = scoreTimelineDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_TIMELINE_TACKS] as List <object>; var currentTacks = new List <TackPoint>(); foreach (var timelineTack in timelineTacks) { var timelineTacksDict = timelineTack as Dictionary <string, object>; var tackTitle = timelineTacksDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_TACK_TITLE] as string; var tackStart = Convert.ToInt32(timelineTacksDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_TACK_START]); var tackSpan = Convert.ToInt32(timelineTacksDict[TimeFlowShikiSettings.TIMEFLOWSHIKI_DATA_TACK_SPAN]); var newTack = new TackPoint(currentTacks.Count, tackTitle, tackStart, tackSpan); currentTacks.Add(newTack); } var newTimeline = new TimelineTrack(currentTimelines.Count, timelineTitle, currentTacks); currentTimelines.Add(newTimeline); } var newScore = new ScoreComponent(scoreId, scoreTitle, currentTimelines); newScores.Add(newScore); } return(newScores); }
public void UpdateTackPoint(TackPoint tackPoint) { this.tackPoint = tackPoint; }