Esempio n. 1
0
 /// <summary>
 /// The menu has had an option selected.
 /// </summary>
 /// <param name="obj">The object that fired the event.</param>
 /// <param name="e">The event arguments.</param>
 private void OnMenuOptionSelected(object obj, ListItemSelectEventArgs e)
 {
     //See what kind of menu option that has been selected.
     switch ((e.Item as LabelListItem).Label.Text)
     {
         case ("New Animation"): { CreateAnimation("test"); break; }
         case ("New Skeleton"): { CreateSkeleton("test"); break; }
         case ("Open Animation"): { DisplayLoadAnimationDialog(); break; }
         case ("Open Skeleton"): { DisplayLoadSkeletonDialog(); break; }
         case ("Save Animation"): { DisplaySaveAnimationDialog(); break; }
         case ("Save Skeleton"): { DisplaySaveSkeletonDialog(); break; }
         case ("Create Bone"): { DisplayCreateBoneDialog(_SelectedBoneIndex); break; }
         case ("Edit Bone"): { DisplayEditBoneDialog(_Character.Skeleton.Bones[_SelectedBoneIndex]); break; }
         case ("Create Keyframe"): { AddKeyframe(_AnimationBars[GetAnimationIndex(_SelectedAnimation)].SelectedFrameNumber + 1); break; }
         case ("Delete Keyframe"): { DeleteKeyframe(_AnimationBars[GetAnimationIndex(_SelectedAnimation)].SelectedFrameNumber); break; }
         case ("Remove Animation"): { RemoveAnimation(_SelectedAnimation); break; }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// An already loaded animation has been selected.
 /// </summary>
 /// <param name="obj">The object that fired the event.</param>
 /// <param name="e">The event arguments.</param>
 private void OnAnimationSelected(object obj, ListItemSelectEventArgs e)
 {
     //Change the selected animation.
     _SelectedAnimation = GetAnimation(_AnimationList.Items.IndexOf(e.Item));
 }
Esempio n. 3
0
 /// <summary>
 /// An item in the list of information has been selected, see if it can be modified.
 /// </summary>
 /// <param name="obj">The object that fired the event.</param>
 /// <param name="e">The event arguments.</param>
 private void OnInformationSelected(object obj, ListItemSelectEventArgs e)
 {
     //Modify the information.
 }
Esempio n. 4
0
 /// <summary>
 /// The menu has had an option selected.
 /// </summary>
 /// <param name="obj">The object that fired the event.</param>
 /// <param name="e">The event arguments.</param>
 private void OnMenuOptionSelected(object obj, ListItemSelectEventArgs e)
 {
     //See what kind of menu option that has been selected.
     switch ((e.Item as LabelListItem).Label.Text)
     {
         case ("New Level"): { break; }
         case ("Open Level"): { break; }
         case ("Save Level"): { break; }
         case ("Add Item"): { LaunchItemChooser(); break; }
         case ("Add Layer"): { break; }
         case ("Delete Layer"): { break; }
         case ("Play"): { ChangeLevelState(LevelState.Play); break; }
         case ("Pause"): { ChangeLevelState(LevelState.Pause); break; }
         case ("Stop"): { break; }
     }
 }