Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            UpdateIds();
            UpdateLists();
            base.OnInspectorGUI();
            serializedObject.Update();
            DrawHeader(Styles.GetStyle(Styles.StyleName.ComponentHeaderThemeNode), MenuUtils.ThemeNode_Manual, MenuUtils.ThemeNode_YouTube);
            DrawDebugMode(true);
            GUILayout.Space(DGUI.Properties.Space(2));
            DrawNodeName();
            GUILayout.Space(DGUI.Properties.Space(8));
            DrawInputSockets(BaseNode);
            GUILayout.Space(DGUI.Properties.Space(8));
            DrawOutputSockets(BaseNode);
            GUILayout.Space(DGUI.Properties.Space(16));
            int themeIndex = Database.GetThemeIndex(TargetNode.ThemeId);

            if (themeIndex != -1)
            {
                DrawThemePopup(Database, m_theme, ThemesNames, themeIndex, DGUI.Colors.ActionColorName, UpdateIds, UpdateLists);
                GUILayout.Space(DGUI.Properties.Space());
            }

            int variantIndex = m_theme.GetVariantIndex(TargetNode.VariantId);

            if (variantIndex != -1)
            {
                DrawVariantPopup(m_theme, VariantsNames, variantIndex, DGUI.Colors.ActionColorName, UpdateIds, UpdateLists);
            }


            GUILayout.Space(DGUI.Properties.Space(2));
            serializedObject.ApplyModifiedProperties();
            SendGraphEventNodeUpdated();
        }