public static void AddKeyframeOk(Window callingWindow)
        {
            if (EditorData.EditorLogic.CurrentKeyframeList == null)
            {
                GuiManager.ShowMessageBox("There is no Keyframe List currently selected", "Error");
                return;
            }

            if (EditorData.CurrentSpriteMembersWatching.Count == 0 &&
                EditorData.CurrentSpriteFrameMembersWatching.Count == 0 &&
                EditorData.CurrentPositionedModelMembersWatching.Count == 0 &&
                EditorData.CurrentTextMembersWatching.Count == 0)
            {
                GuiManager.ShowMessageBox("There are no members being recorded.  Try opening the " +
                                          "\"used members\" window through Window->Used Members menu item.", "No members");
                return;
            }

            InstructionList instructionList = new InstructionList();

            instructionList.Name = ((TextInputWindow)callingWindow).Text;
            double timeToExecute = GuiData.TimeLineWindow.timeLine.CurrentValue;

            EditorData.AddInstructionsToList(instructionList, timeToExecute);

            GuiData.TimeLineWindow.UpdateToCurrentSet();
            EditorData.EditorLogic.CurrentKeyframeList.Add(instructionList);

            GuiData.ListBoxWindow.UpdateLists();
        }
Exemple #2
0
        private static void UpdateCurrentKeyframe(Window callingWindow)
        {
            if (EditorData.EditorLogic.CurrentKeyframe != null)
            {
                double timeToExecute = TimeLineWindow.CurrentValue;

                if (EditorData.EditorLogic.CurrentKeyframe.Count > 0)
                {
                    timeToExecute = EditorData.EditorLogic.CurrentKeyframe[0].TimeToExecute;
                }

                InstructionList instructionList = new InstructionList();

                EditorData.AddInstructionsToList(instructionList, timeToExecute);


                EditorData.EditorLogic.CurrentKeyframe.Clear();
                EditorData.EditorLogic.CurrentKeyframe.AddRange(instructionList);
            }
        }