protected override EditorTexture DefinedIcon()
        {
            UAliveResources.CacheTextures();

            return(EditorTexture.Single(UAliveResources.processorDirectiveUnit));
        }
Ejemplo n.º 2
0
        protected override void OnGUIBlock(Rect position, GUIContent label)
        {
            base.OnGUIBlock(position, label);

            UAliveResources.CacheTextures();

            // Methods and Fields are anonymous within a Dictionary.
            // In order for them to be aware they are owned by this class,
            // this class must assign them a reference to itself
            OnMethodCountChanged();
            OnVariableCountChanged();

            // We must clear the variable.
            // This inherits from OnGUIBlock.
            // Set the height to the Y at the end.
            // Get Height auto returns that variable.
            y = 0f;

            var accessibilityRect = Accessibility(lastPosition);

            var baseRect = BaseType(position, accessibilityRect);

            var interfacesRect = UAliveGUI.DrawSection
                                 (
                baseRect,
                accessor["interfaces"],
                accessor,
                e,
                "Interfaces",
                UAliveResources.contract,
                52,
                true,
                interfaces.Count,
                accessor["interfacesOpen"]
                                 );

            var variablesRect = UAliveGUI.DrawSection
                                (
                interfacesRect,
                accessor["variables"],
                accessor,
                e,
                "Variables",
                UAliveResources.variable,
                52,
                true,
                variables.Count,
                accessor["variablesOpen"],
                isEditor: false,
                new List <Rect>()
            {
                new Rect(interfacesRect.x + interfacesRect.width - 120, interfacesRect.y + interfacesRect.height + 14, 80, 16)
            }
                                );

            VariableOverrideButton(new Rect(variablesRect.x + variablesRect.width - 120, variablesRect.y + 14, 80, 16));

            lastPosition.y += variablesRect.height;
            y += variablesRect.height;

            ForceAllPrivate();

            var methodsOpen = (bool)accessor["methodsOpen"].value;

            var methodsHeight = methodsOpen ? (int)accessor["methods"].Inspector <MethodsInspector>().GetCachedHeight(position.width, GUIContent.none, accessor.Editor <ObjectMacroInspector>()) : 52;

            if (methodsOpen && (int)accessor["methods"].Count == 0)
            {
                methodsHeight = 35;
            }


            var methodsRect = UAliveGUI.DrawSection
                              (
                variablesRect,
                accessor["methods"],
                accessor,
                e,
                "Methods",
                UAliveResources.method,
                methodsHeight,
                true,
                methods.Count,
                accessor["methodsOpen"],
                isEditor: true
                              );

            height += variablesRect.height + methodsRect.height + interfacesRect.height + baseRect.height + accessibilityRect.height;
        }
Ejemplo n.º 3
0
        protected override EditorTexture DefaultIcon()
        {
            UAliveResources.CacheTextures();

            return(EditorTexture.Single(UAliveResources.isUnit));
        }
Ejemplo n.º 4
0
        protected override EditorTexture DefinedIcon()
        {
            UAliveResources.CacheTextures();

            return(EditorTexture.Single(UAliveResources.constructorUnit));
        }