public Button(Buttontype type, Texture2D texture, float f) { Type = type; Texture = texture; SetSize(); Position = Type == Buttontype.Promotion ? new Vector2(f, (Helper.GraphicsDevice.Viewport.Height / 2) - (Texture.Height/2)) : new Vector2(((Helper.GraphicsDevice.Viewport.Width / 2) - (Texture.Width / 2)), f); }
public Button(Buttontype type, Texture2D texture, Vector2 pos) { Type = Type; Texture = texture; Position = pos; SetSize(); }