public ToggleButton(Game game, Rectangle bounds, string text, clicked c) : base(game, bounds, text, c) { OnLoad(null); del = c; Selected = false; }
public Button(Game game, Rectangle bounds, string text, clicked c, bool stretch, bool custom, Color col) : this(game, bounds, text, c) { if (stretchable = stretch) //rofl n1 matt { end1 = new Rect(new Rectangle(bounds.X, bounds.Y, 65, bounds.Height), Skin.skindict["buttonLeft"]); end2 = new Rect(new Rectangle(bounds.X + bounds.Width - 63, bounds.Y, 66, bounds.Height), Skin.skindict["buttonRight"]); texture = new Rect(new Rectangle(bounds.X + 65, bounds.Y, bounds.Width - 128, bounds.Height), Skin.skindict["buttonMid"]); TextTexture.Location = new Point((bounds.X + bounds.Width / 2) - ((int)Pulse.Text.getStringSize(text, textTexture.textFont).Width / 2), bounds.Y + (bounds.Height / 2) - 20); } customcol = custom; this.custom = col; }
public Button(Game game, Rectangle bounds, string text, clicked c, string customTexture) : this(game, bounds, text, c) { customTexturePath = customTexture; texture = new Rect(bounds, customTexturePath); }
public Button(Game game, Rectangle bounds, string text, clicked c) : base(game, bounds, text) { OnLoad(null); del = c; }