public Button(String name, String text, Vector2 position, int width, int height, Control alignedTo, Texture2D image, Texture2D hoverImage, Texture2D heldImage) : base(position, width, height, alignedTo, new Dictionary <string, Texture2D> { { "image", image }, { "hoverImage", hoverImage }, { "heldImage", heldImage } }) { this.currentImage = Images["image"]; this.font = EngineContentManager.GetXNAContent().Load <SpriteFont>("Visitor"); this.text = text; }
public Button(String name, String text, Vector2 position, int width, int height, Control alignedTo, Color color, Color hoverColor, Color heldColor) : base(position, width, height, alignedTo, new Dictionary <string, Texture2D> { { "image", DrawUtilities.GetWhitePixelTexture() }, { "hoverImage", DrawUtilities.GetWhitePixelTexture() }, { "heldImage", DrawUtilities.GetWhitePixelTexture() } }) { this.currentImage = Images["image"]; this.font = EngineContentManager.GetXNAContent().Load <SpriteFont>("Visitor"); this.text = text; this.color = color; this.heldColor = heldColor; this.hoverColor = hoverColor; this.currentColor = color; }