protected override void DrawInspector()
        {
            var cutscene = GetCurrentCutscene();

            appearanceEditor.Data = cutscene;
            appearanceEditor.OnInspectorGUI();

            /*
             * View for videoscene
             */
            if (cutscene.isVideoscene())
            {
                PreviewTitle = "Videoscenes.Preview".Traslate();
                // Background chooser
                EditorGUI.BeginChangeCheck();
                video.Path = cutscene.getPathToVideo();
                video.DoLayout();
                if (EditorGUI.EndChangeCheck())
                {
                    cutscene.setPathToVideo(video.Path);
                }

                EditorGUI.BeginChangeCheck();
                var canSkipVideo = EditorGUILayout.Toggle(new GUIContent(TC.get("Videoscene.Skip.border"), TC.get("Videoscene.Skip.label")), cutscene.getCanSkip());
                if (EditorGUI.EndChangeCheck())
                {
                    cutscene.setCanSkip(canSkipVideo);
                }
            }

            /*
             * View for slidescene
             */
            else
            {
                PreviewTitle = "Slidescenes.Preview".Traslate();
                // Background chooser
                EditorGUI.BeginChangeCheck();
                slides.Path = cutscene.getPathToSlides();
                slides.DoLayout();
                if (EditorGUI.EndChangeCheck())
                {
                    cutscene.setPathToSlides(slides.Path);
                }

                // Music chooser
                EditorGUI.BeginChangeCheck();
                music.Path = cutscene.getPathToMusic();
                music.DoLayout();
                if (EditorGUI.EndChangeCheck())
                {
                    cutscene.setPathToMusic(music.Path);
                }
            }
        }
 private void DoAnimationSelector(AnimationField field, string animationName)
 {
     EditorGUI.BeginChangeCheck();
     field.Path = workingCharacter.getAnimationPath(animationName);
     field.DoLayout();
     if (EditorGUI.EndChangeCheck())
     {
         workingCharacter.addAnimationPath(animationName, field.Path);
         RefreshPathInformation(workingCharacter);
     }
 }
Exemplo n.º 3
0
        public void draw()
        {
            // Position
            var pos = EditorGUILayout.Vector2IntField("", new Vector2Int(effect.getX(), effect.getY()));

            effect.setDestiny(pos.x, pos.y);
            // Animation
            var prevLabelWidth = EditorGUIUtility.labelWidth;

            EditorGUIUtility.labelWidth = 90;
            animationField.Label        = TC.get("Effect.PlayAnimation");
            animationField.Path         = effect.getPath();
            animationField.DoLayout();
            effect.setPath(animationField.Path);
            EditorGUIUtility.labelWidth = prevLabelWidth;

            EditorGUILayout.HelpBox(TC.get("PlayAnimationEffect.Description"), MessageType.Info);
        }