예제 #1
0
 public SpriteSheetButton(Location location, Dimensions dimensions, string text, OnClickEventHandler onClick = null, int?edgeThickness = null, string[] backgroundNames = null, Color?hoverColor = null, string textFont = null, bool tiled = true) : base(location, dimensions, text, onClick, edgeThickness, hoverColor, textFont)
 {
     background        = new UISpriteSheet(SimpleLocation.Zero, InheritDimensions.All, tiled: tiled);
     background.Parent = this;
     background.AddSpritesheets(backgroundNames ?? new string[] { DefaultUIValues.Default.DefaultButtonBackground });
     ConstantComponents.Insert(0, background);
 }
예제 #2
0
 public TextureButton(Location location, Dimensions dimensions, string text, Texture2D texture = null, Color?color = null, OnClickEventHandler onClick = null, int?edgeThickness = null, Color?hoverColor = null, string textFont = null) : base(location, dimensions, text, onClick, edgeThickness, hoverColor, textFont)
 {
     background        = new Background(texture, color);
     background.Parent = this;
     ConstantComponents.Insert(0, background);
 }