//Moves a frame down in the list public void MoveFrameDown(int frameId) { frameClass oldItem = myTutorials[selectedTutorialIndex].myFrames[frameId + 1]; myTutorials[selectedTutorialIndex].myFrames[frameId + 1] = myTutorials[selectedTutorialIndex].myFrames[frameId]; myTutorials[selectedTutorialIndex].myFrames[frameId] = oldItem; }
//Updates the tutorial and frame data variables public void UpdateData() { frame_data = myTutorials[tutorial.id].myFrames[frame.id]; tutorial_data = myTutorials[tutorial.id]; }
//Adds a new frame to a specified tutorial public void AddFrame(int tutorialId) { if (myTutorials[tutorialId].myFrames.Count > 0) { //get the settings of the latest frame frameClass oldFrame = myTutorials[tutorialId].myFrames[myTutorials[tutorialId].myFrames.Count - 1]; //Add frame myTutorials[tutorialId].myFrames.Add(new frameClass { frameName = "Frame " + (myTutorials[tutorialId].myFrames.Count + 1), }); //get the settings of the newest frame frameClass newFrame = myTutorials[tutorialId].myFrames[myTutorials[tutorialId].myFrames.Count - 1]; //background settings newFrame.useBackground = oldFrame.useBackground; if (oldFrame.fadeInBackground) { newFrame.fadeInBackground = false; } newFrame.background_fade_speed = oldFrame.background_fade_speed; //highlight targets newFrame.doHighlight = oldFrame.doHighlight; newFrame.detectUIClicks = oldFrame.detectUIClicks; //point arrow newFrame.useArrow = oldFrame.useArrow; newFrame.arrow_pointDirection = oldFrame.arrow_pointDirection; newFrame.arrowOffset_x = oldFrame.arrowOffset_x; newFrame.arrowOffset_y = oldFrame.arrowOffset_y; newFrame.arrow_useFloatingEffect = oldFrame.arrow_useFloatingEffect; newFrame.arrowFloating_Range = oldFrame.arrowFloating_Range; newFrame.arrowFloating_Speed = oldFrame.arrowFloating_Speed; newFrame.arrow_useFadeIn = oldFrame.arrow_useFadeIn; newFrame.arrow_fade_speed = oldFrame.arrow_fade_speed; //outline newFrame.target_outline = oldFrame.target_outline; newFrame.outlineColor = oldFrame.outlineColor; newFrame.outlineThickness = oldFrame.outlineThickness; //icon newFrame.icon_fly_speed = oldFrame.icon_fly_speed; newFrame.icon_fade_speed = oldFrame.icon_fade_speed; //text newFrame.text_fly_speed = oldFrame.text_fly_speed; newFrame.text_fade_speed = oldFrame.text_fade_speed; newFrame.text_typing_speed = oldFrame.text_typing_speed; newFrame.text_letter_amount = oldFrame.text_letter_amount; //audio newFrame.useAudio = oldFrame.useAudio; newFrame.audioClip = oldFrame.audioClip; newFrame.audio_clip_output = oldFrame.audio_clip_output; } else { myTutorials[tutorialId].myFrames.Add(new frameClass { frameName = "Frame " + (myTutorials[tutorialId].myFrames.Count + 1), }); } }