Ejemplo n.º 1
0
 public static ButtonWidget Create( Game game, int x, int y, int width, int height, string text, Anchor horizontal,
     Anchor vertical, Font font, Action<Game, Widget> onClick)
 {
     ButtonWidget widget = new ButtonWidget( game, font );
     widget.Init();
     widget.HorizontalAnchor = horizontal;
     widget.VerticalAnchor = vertical;
     widget.XOffset = x; widget.YOffset = y;
     widget.DesiredMaxWidth = width; widget.DesiredMaxHeight = height;
     widget.SetText( text );
     widget.OnClick = onClick;
     return widget;
 }