Exemplo n.º 1
0
        public UIScrollPanel()
        {
            this.AutoSize               = false;
            this.Restriction            = ScrollRestriction.Unrestricted;
            this.accel                  = new Accelerator2D();
            this.ClipContent            = true;
            this.ClampContent           = true;
            this.InputDown             += UIScrollPanel_MouseHeld;
            this.InputPressed          += UIScrollPanel_MousePressed;
            this.InputReleasedAnywhere += UIScrollPanel_MouseReleasedAnywhere;

            contentPanel = new UIPanel();
            contentPanel.AbsorbPointer = false;
            contentPanel.AutoSize      = true;
            contentPanel.DrawBounds    = false;

            contentPanel.AddConstraint(Edge.TopLeft, this, Edge.TopLeft);

            base.AddChild(contentPanel);
        }