public ScrollPanelTestDialog() : base("Scroll Panel Test", 400, 400, 320, 240) { girdLayout=new GirdLayout(2,1); girdLayout.Right = 16; girdLayout.Left = 16; girdLayout.Top = 8; girdLayout.Bottom = 8; girdLayout.Spacer = 4; girdLayout.SetHorizontalAlignment(1,0, EHAlignment.HRight); closeButton=new Button("Close"); panel=new ScrollPanel(); Layout = girdLayout; Add(panel); Add(closeButton); Pack(); closeButton.MouseReleasedEvent += new MouseReleasedHandler(closeButton_MouseReleasedEvent); }
public override void PaintScrollPanel(ScrollPanel component) { Position origin = UI.Instance.GetOrigin(); GL.Disable(EnableCap.Texture2D); GL.Color3((byte)79, (byte)91, (byte)84); GL.Begin(BeginMode.Quads); GL.Vertex2(origin.X + component.Position.X, origin.Y + component.Position.Y); GL.Vertex2(origin.X + component.Position.X + component.Size.width, origin.Y + component.Position.Y); GL.Vertex2(origin.X + component.Position.X + component.Size.width, origin.Y + component.Position.Y + component.Size.height); GL.Vertex2(origin.X + component.Position.X, origin.Y + component.Position.Y + component.Size.height); GL.End(); }
public abstract void PaintScrollPanel(ScrollPanel component);