public override void Draw(int aID)
        {
            current = Controller.Instance.ChapterList.getSelectedChapterDataControl().getCutscenesList().getCutscenes()[GameRources.GetInstance().selectedCutsceneIndex];

            var xAPIConfigurable = current as IxAPIConfigurable;

            //XApi class
            EditorGUI.BeginChangeCheck();
            var classes = xAPIConfigurable.getxAPIValidClasses();

            if (!classes.Contains(xAPIConfigurable.getxAPIClass()))
            {
                xAPIConfigurable.setxAPIClass(classes[0]);
            }

            var newClass = classes[EditorGUILayout.Popup("xAPI Class", classes.IndexOf(xAPIConfigurable.getxAPIClass()), classes.ToArray())];

            if (EditorGUI.EndChangeCheck())
            {
                xAPIConfigurable.setxAPIClass(newClass);
            }

            // Xapi Type
            EditorGUI.BeginChangeCheck();
            var types = xAPIConfigurable.getxAPIValidTypes(xAPIConfigurable.getxAPIClass());

            if (!types.Contains(xAPIConfigurable.getxAPIType()))
            {
                xAPIConfigurable.setxAPIType(types[0]);
            }

            var newType = types[EditorGUILayout.Popup("xAPI type", types.IndexOf(xAPIConfigurable.getxAPIType()), types.ToArray())];

            if (EditorGUI.EndChangeCheck())
            {
                xAPIConfigurable.setxAPIType(newType);
            }


            EditorGUI.BeginChangeCheck();
            var nameOfCutscene = EditorGUILayout.TextField(TC.get("Cutscene.Name"), current.getName());

            if (EditorGUI.EndChangeCheck())
            {
                current.setName(nameOfCutscene);
            }

            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PrefixLabel(TC.get("Cutscene.Documentation"));
            var description = EditorGUILayout.TextArea(current.getDocumentation(), GUILayout.ExpandHeight(true));

            if (EditorGUI.EndChangeCheck())
            {
                current.setDocumentation(description);
            }
        }
        public override bool moveElementDown(DataControl dataControl)
        {
            bool elementMoved = false;
            int  elementIndex = cutscenesList.IndexOf((Cutscene)dataControl.getContent());

            if (elementIndex < cutscenesList.Count - 1)
            {
                Cutscene            e = cutscenesList[elementIndex];
                CutsceneDataControl c = cutscenesDataControlList[elementIndex];
                cutscenesList.RemoveAt(elementIndex);
                cutscenesDataControlList.RemoveAt(elementIndex);
                cutscenesList.Insert(elementIndex + 1, e);
                cutscenesDataControlList.Insert(elementIndex + 1, c);
                //controller.dataModified( );
                elementMoved = true;
            }

            return(elementMoved);
        }
        public override void Draw(int aID)
        {
            var allTargets = GetSceneNames();

            current = Controller.Instance.ChapterList.getSelectedChapterDataControl().getCutscenesList().getCutscenes()[GameRources.GetInstance().selectedCutsceneIndex];

            GUILayout.Label(TC.get("Cutscene.CutsceneEndReached"));
            GUILayout.Space(20);

            // Selected option
            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.FlexibleSpace();
                EditorGUI.BeginChangeCheck();
                var selectedOption = GUILayout.Toolbar(current.getNext(), possibleOptions, GUILayout.Width(m_Rect.width * 0.8f));
                if (EditorGUI.EndChangeCheck())
                {
                    current.setNext(selectedOption);
                }
                GUILayout.FlexibleSpace();
            }

            if (current.getNext() != 2)
            {
                return;
            }

            GUILayout.Space(20);

            using (new EditorGUI.IndentLevelScope())
            {
                // Next target
                var nextSceneIndex = Mathf.Max(0, allTargets.IndexOf(current.getNextSceneId()));
                EditorGUI.BeginChangeCheck();
                nextSceneIndex = EditorGUILayout.Popup(TC.get("NextScene.Title"), nextSceneIndex, allTargets.ToArray());
                if (EditorGUI.EndChangeCheck() && nextSceneIndex.InRange(0, allTargets.Count - 1))
                {
                    current.setNextSceneId(allTargets[nextSceneIndex]);
                }

                // Effects
                if (GUILayout.Button(TC.get("GeneralText.EditEffects")))
                {
                    var window = ScriptableObject.CreateInstance <EffectEditorWindow>();
                    window.Init(Controller.Instance.SelectedChapterDataControl.getCutscenesList().getCutscenes()[
                                    GameRources.GetInstance().selectedCutsceneIndex].getEffects());
                }

                // Transition Type
                EditorGUI.BeginChangeCheck();
                var newType = EditorGUILayout.Popup(TC.get("NextScene.Transition"), (int)current.getTransitionType(), transitionTypes);
                if (EditorGUI.EndChangeCheck())
                {
                    current.setTransitionType((TransitionType)newType);
                }

                // Transition Time
                EditorGUI.BeginChangeCheck();
                var time = Mathf.Clamp(EditorGUILayout.IntField(TC.get("NextScene.TransitionTime"), current.getTransitionTime()), 0, 5000);
                if (EditorGUI.EndChangeCheck())
                {
                    current.setTransitionTime(time);
                }
            }
        }