private void InteractionEditing(int loop)
        {
            int indexer = 0;

            for (int i = 1; i < interactionOptions.Length; i++)
            {
                if (serializedObject.FindProperty(string.Format(InteractionDataAccess, loop)).stringValue == interactionOptions[i])
                {
                    indexer = i;
                    break;
                }
            }

            if (CustomGUI.ChangeCheckingPopup(ref indexer, interactionOptions, Simulation.Strings.InteractionLabelToExtend(loop + 1)))
            {
                serializedObject.FindProperty(string.Format(InteractionDataAccess, loop)).stringValue = interactionOptions[indexer];
            }

            EditorGUILayout.BeginHorizontal();
            {
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.LargeMargin();
                EditorExtensionSettings.MediumMargin();

                if (GUILayout.Button("Edit interactions"))
                {
                    NEEDSIMEditor.CustomMainWindow.MainWindowInit(CustomMainWindow.Screens.Interactions);
                }
            }
            EditorGUILayout.EndHorizontal();
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.BeginVertical();
            {
                if (GUILayout.Button("Edit data for NEEDSIM Life simulation"))
                {
                    NEEDSIMEditor.CustomMainWindow.MainWindowInit(NEEDSIMEditor.CustomMainWindow.Screens.Start);
                }
            }
            EditorGUILayout.EndVertical();

            if (generalSettings = EditorGUILayout.Foldout(generalSettings, Simulation.Strings.GeneralSettings))
            {
                EditorExtensionSettings.StandardMargin();
                GeneralSettingsEditing();
            }

            EditorExtensionSettings.LargeMargin();
            if (advancedSettings = EditorGUILayout.Foldout(advancedSettings, Simulation.Strings.AdvancedSettings))
            {
                EditorExtensionSettings.StandardMargin();
                AdvancedSettingsEditing();
            }
            serializedObject.ApplyModifiedProperties();
        }
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            if (generalSettings = EditorGUILayout.Foldout(generalSettings, Simulation.Strings.GeneralSettings))
            {
                EditorExtensionSettings.StandardMargin();
                GeneralSettingsEditing();
            }

            EditorExtensionSettings.LargeMargin();
            if (advancedSettings = EditorGUILayout.Foldout(advancedSettings, Simulation.Strings.AdvancedSettings))
            {
                EditorExtensionSettings.StandardMargin();
                AdvancedSettingsEditing();
            }
            serializedObject.ApplyModifiedProperties();
        }