Пример #1
0
        public override void Draw(Rect outRect)
        {
            if (propScreen())
            {
                resizeAllChildren(this);
                Resize();
                outRect = rect;
            }

            WindowStyle.fontSize  = PV.Font("C2");
            WindowStyle.alignment = TextAnchor.UpperRight;

            rect = GUI.Window(id, outRect, drawWindow, HeaderText, WindowStyle);
        }
Пример #2
0
        public Window(string name, Rect ratio, string header, string title, List <Element> children) : base(name, PV.PropScreenMH(ratio))
        {
            this.sizeRatio   = ratio;
            this.HeaderText  = header;
            this.TitleText   = title;
            this.TitleHeight = PV.Line("C1");

            if (children != null && children.Count > 0)
            {
                this.children = new List <Element>(children);
                foreach (Element child in children)
                {
                    child.Parent        = this;
                    child.NotifyParent += this.onChildChenged;
                }
                Resize();
            }

            lastScreenSize = new Vector2(Screen.width, Screen.height);
        }