Exemple #1
0
 public ViewHostComponent createViewHostComponent(MyGUIView view, AnomalousMvcContext context, MyGUIViewHost viewHost)
 {
     if (view is PropTimelineView)
     {
         var          propView     = (PropTimelineView)view;
         PropTimeline propTimeline = new PropTimeline(clipboard, propView.PropEditController, propView.PropFactory, viewHost);
         return(propTimeline);
     }
     else if (view is OpenPropManagerView)
     {
         OpenPropManager openPropManager = new OpenPropManager(((OpenPropManagerView)view).PropEditController, viewHost);
         return(openPropManager);
     }
     return(null);
 }
 /// <summary>
 /// Add the actions from the container to the timeline. This will NOT
 /// create copies of the actions and relies on the clipboard to do this.
 /// </summary>
 /// <param name="propData"></param>
 /// <param name="propTimeline"></param>
 /// <param name="markerTime"></param>
 /// <param name="totalDuration"></param>
 public void addActionsToTimeline(ShowPropAction propData, PropTimeline propTimeline, float markerTime, float totalDuration)
 {
     foreach (ShowPropSubAction copiedAction in copiedActions)
     {
         copiedAction.StartTime = copiedAction.StartTime - startTimeZeroOffset + markerTime;
         if (copiedAction.EndTime > totalDuration)
         {
             copiedAction.StartTime -= (copiedAction.EndTime - totalDuration);
             if (copiedAction.StartTime < 0)
             {
                 copiedAction.StartTime = 0.0f;
                 copiedAction.Duration  = totalDuration;
             }
         }
         propData.addSubAction(copiedAction);
     }
 }