コード例 #1
0
ファイル: EditorGUIUtils.cs プロジェクト: Hengle/NUtilities
            public ContainerScope(GUIContent headerLabel, int bottomMargin = 8, int bottomPadding = 5)
            {
                this.bottomMargin  = bottomMargin;
                this.bottomPadding = bottomPadding;
                DrawHeaderWithBackground(headerLabel);
                scope = new EditorGUILayout.VerticalScope(SmallPadding);
                Rect rect = scope.rect;

                rect.yMin -= 2;

                if (Event.current.type == EventType.Repaint)
                {
                    BoxBackground.Draw(rect, GUIContent.none, 0);
                }
            }
コード例 #2
0
ファイル: Box.cs プロジェクト: jpx/blazera
        public Box(Boolean noBackgroundMode = true, String name = null, Boolean backgroundNoBackgroundMode = true)
            : base()
        {
            IsBackgroundColorLinked = true;

            NoBackgroundMode = noBackgroundMode;

            if (!NoBackgroundMode)
                Background = new BoxBackground(new Vector2f(1F, 1F), name, backgroundNoBackgroundMode);

            Name = name;

            Items = new List<Widget>();

            Levels = new Dictionary<Widget, UInt32>();
            LevelOffset = DEFAULT_LEVEL_OFFSET;
        }