Beispiel #1
0
        public override void Draw(int aID)
        {
            workingCharacter = Target != null ? Target as NPCDataControl : Controller.Instance.SelectedChapterDataControl.getNPCsList().getNPCs()[GameRources.GetInstance().selectedCharacterIndex];


            // -------------
            // Documentation
            // -------------

            GUILayout.Label(TC.get("NPC.Documentation"));
            EditorGUI.BeginChangeCheck();
            var fullItemDescription = GUILayout.TextArea(workingCharacter.getDocumentation() ?? string.Empty);

            if (EditorGUI.EndChangeCheck())
            {
                workingCharacter.setDocumentation(fullItemDescription);
            }


            // -------------
            // Descriptions
            // -------------
            descriptionsEditor.Descriptions = workingCharacter.getDescriptionController();
            descriptionsEditor.OnInspectorGUI();
            GUILayout.Space(20);
        }
Beispiel #2
0
        public override void Draw(int aID)
        {
            workingGeoElement = Target as GeoElementDataControl ?? GeoController.Instance.GeoElements.DataControls[GeoController.Instance.SelectedGeoElement];


            // -------------
            // Documentation
            // -------------

            GUILayout.Label(TC.get("Item.Documentation"));
            EditorGUI.BeginChangeCheck();
            var documentation = GUILayout.TextArea(workingGeoElement.Documentation ?? string.Empty);

            if (EditorGUI.EndChangeCheck())
            {
                workingGeoElement.Documentation = documentation;
            }


            // -------------
            // Descriptions
            // -------------
            descriptionsEditor.Descriptions = workingGeoElement.DescriptionController;
            descriptionsEditor.OnInspectorGUI();
            GUILayout.Space(20);
        }
Beispiel #3
0
            public override void Draw(int aID)
            {
                var workingActiveArea = Target as ActiveAreaDataControl;

                // -------------
                // Descriptions
                // -------------
                descriptionsEditor.Descriptions = workingActiveArea.getDescriptionsController();
                descriptionsEditor.OnInspectorGUI();
                GUILayout.Space(20);

                // -------------
                // Behaviour
                // -------------
                EditorGUI.BeginChangeCheck();
                var selectedBehaviourType = EditorGUILayout.Popup(TC.get("Behaviour"), (int)workingActiveArea.getBehaviour(), behaviourTypes.Select(bt => TC.get(bt)).ToArray());

                Item.BehaviourType type = (selectedBehaviourType == 0 ? Item.BehaviourType.NORMAL : Item.BehaviourType.FIRST_ACTION);
                if (EditorGUI.EndChangeCheck())
                {
                    workingActiveArea.setBehaviour(type);
                }
                EditorGUILayout.HelpBox(TC.get(behaviourTypesDescription[selectedBehaviourType]), MessageType.Info);
                GUILayout.Space(20);
            }
        public override void Draw(int aID)
        {
            workingItem = Target as ItemDataControl ?? Controller.Instance.SelectedChapterDataControl.getItemsList().getItems()[GameRources.GetInstance().selectedItemIndex];


            // -------------
            // Documentation
            // -------------

            GUILayout.Label(TC.get("Item.Documentation"));
            EditorGUI.BeginChangeCheck();
            var fullItemDescription = GUILayout.TextArea(workingItem.getDocumentation() ?? string.Empty);

            if (EditorGUI.EndChangeCheck())
            {
                workingItem.setDocumentation(fullItemDescription);
            }


            // -------------
            // Descriptions
            // -------------
            descriptionsEditor.Descriptions = workingItem.getDescriptionController();
            descriptionsEditor.OnInspectorGUI();
            GUILayout.Space(20);

            // -------------
            // Drag & drop
            // -------------

            EditorGUILayout.LabelField(TC.get("Item.ReturnsWhenDragged.Title"));
            EditorGUI.BeginChangeCheck();
            var dragdropToogle = EditorGUILayout.Toggle(dragdropLabel, workingItem.isReturnsWhenDragged());

            if (EditorGUI.EndChangeCheck())
            {
                workingItem.setReturnsWhenDragged(dragdropToogle);
            }
            GUILayout.Space(20);

            // -------------
            // Behaviour
            // -------------
            EditorGUI.BeginChangeCheck();
            var selectedBehaviourType = EditorGUILayout.Popup(TC.get("Behaviour"), (int)workingItem.getBehaviour(), behaviourTypes.Select(bt => TC.get(bt)).ToArray());

            Item.BehaviourType type = (selectedBehaviourType == 0 ? Item.BehaviourType.NORMAL : Item.BehaviourType.FIRST_ACTION);
            if (EditorGUI.EndChangeCheck())
            {
                workingItem.setBehaviour(type);
            }
            EditorGUILayout.HelpBox(TC.get(behaviourTypesDescription[selectedBehaviourType]), MessageType.Info);
            GUILayout.Space(20);

            // -------------
            // Transition time
            // -------------
            EditorGUI.BeginChangeCheck();
            var transitionTime = Math.Max(EditorGUILayout.LongField(transitionLabel, workingItem.getResourcesTransitionTime()), 0);

            if (EditorGUI.EndChangeCheck())
            {
                workingItem.setResourcesTransitionTime(transitionTime);
            }
        }