Exemplo n.º 1
0
        private void OnGUI()
        {
            AutoResizeRects();
            DrawTexturesInRects();
            Event e = Event.current;

            GUILayoutElements.ResizingRectsHorizontal(
                this,
                ref elementsListSection,
                ref elementOptionsSection,
                e,
                ref resizing,
                12f
                );
            resizeFactor = elementsListSection.width / this.position.width;

            DrawCreatorPlacing();
            DrawCreatorTypes();

            if (this.creator != null)
            {
                DrawElementListSection();
                DrawElementOptionSection();

                EditorUtility.SetDirty(this.creator);
            }
            if (creator != null && creator.gameObjectTransform != null)
            {
                PlayingAnimation();
            }
        }
        private void Resizing(Event e)
        {
            float leftSpaceResizing_1  = 10f;
            float rightSpaceResizing_1 = leftSpace.width < 10f ? 10f : 0f;

            float leftSpaceResizing_2  = 0f;
            float rightSpaceResizing_2 = 10f;

            GUILayoutElements.ResizingRectsHorizontal(
                this,
                ref leftSpace,
                ref middleSpace,
                e,
                ref resizing1,
                leftSpaceResizing_1,
                rightSpaceResizing_1
                );
            GUILayoutElements.ResizingRectsHorizontal(
                this,
                ref middleSpace,
                ref rightSpace,
                e,
                ref resizing2,
                leftSpaceResizing_2,
                rightSpaceResizing_2
                );
        }
 private void ResizeRects(Event e)
 {
     GUILayoutElements.ResizingRectsHorizontal(
         this,
         ref leftSpace,
         ref rightSpace,
         e,
         ref resizing,
         7,
         7
         );
 }