public Button(string caption, Box areaDefault, Box areaPressed, Box areaHover) { Caption = caption; AreaDefault = areaDefault; AreaPressed = areaPressed; AreaHover = areaHover; MousePressed += new MousePressedHandler(Button_MousePressed); MouseReleased += new MouseReleasedHandler(Button_MouseReleased); }
public Container(Box area) { Area = area; }
protected virtual void DrawButton(Graphics g, Box area, GameTime gameTime) { area.Draw(g, Size); g.DrawString(InheritedFont, Caption, new Rectangle(1, 1, Width, Height), TextAlignment, Color.Black); g.DrawString(InheritedFont, Caption, new Rectangle(0, 0, Width, Height), TextAlignment, Color.White); /* g.DrawString(InheritedFont, "Top\nLeft", new Rectangle(0, 0, Width, Height), TextAlignment.TopLeft, Color.Red); g.DrawString(InheritedFont, "TopCenter", new Rectangle(0, 0, Width, Height), TextAlignment.TopCenter, Color.Green); g.DrawString(InheritedFont, "TopRight", new Rectangle(0, 0, Width, Height), TextAlignment.TopRight, Color.Blue); g.DrawString(InheritedFont, "CenterLeft", new Rectangle(0, 0, Width, Height), TextAlignment.CenterLeft, Color.BlueViolet); g.DrawString(InheritedFont, "Center\nCent\tererer\nRecente\tr", new Rectangle(0, 0, Width, Height), TextAlignment.Center, Color.Yellow); g.DrawString(InheritedFont, "CenterRight", new Rectangle(0, 0, Width, Height), TextAlignment.CenterRight, Color.Orange); g.DrawString(InheritedFont, "BottomLeft", new Rectangle(0, 0, Width, Height), TextAlignment.BottomLeft, Color.NavajoWhite); g.DrawString(InheritedFont, "BottomCenter", new Rectangle(0, 0, Width, Height), TextAlignment.BottomCenter, Color.Purple); g.DrawString(InheritedFont, "Bottom\nRight", new Rectangle(0, 0, Width, Height), TextAlignment.BottomRight, Color.Sienna);*/ }