public void AddText(float percentX, float percentY, SpriteFont sf, Color c, string text)
 {
     int x = (int)(percentX * RNSEB.RESOLUTION.X);
     int y = (int)(percentY * RNSEB.RESOLUTION.Y);
     HenryText t = new HenryText(new Vector2(x, y), sf, text);
     t.Color = c;
     texts.Add(t);
 }
 public ProgressSquare(ContentManager cm, Rectangle area, string spriteName)
 {
     tick = new HenrySprite(cm);
     text = new HenryText(new Vector2(area.Center.X, area.Center.Y-15), cm.Load<SpriteFont>("ButtonFont"));
     text.Color = Color.White;
     tick.LoadContent(spriteName, true, 5);
     tick.Scale = area.Height / tick.Size.Y;
     this.area = area;
     borderPixel = new HenrySprite(cm);
     borderPixel.LoadContent("WhiteDot", false);
 }
        public ProgressBar(ContentManager cm, Rectangle area, string spriteName)
        {
            tick = new HenrySprite(cm);
            text = new HenryText(new Vector2(area.Center.X, area.Center.Y-15), cm.Load<SpriteFont>("ButtonFont"));
            text.Color = Color.White;
            tick.LoadContent(spriteName, true, 5);
            tick.Scale = area.Height / tick.Size.Y;
            this.area = area;
            borderPixel = new HenrySprite(cm);
            borderPixel.LoadContent("WhiteDot", false);

            //RNSEB.Win.ClientSizeChanged += new EventHandler<EventArgs>(ResolutionChange);
        }
        public HenryButton(int x, int y, string text,  RNSEB.OnClick onClick, ContentManager cm, string spriteNormal, string spriteHighlight, string spritePress)
            : base(cm)
        {
            buttonNormal = spriteNormal;
            buttonHighlight = spriteHighlight;
            buttonClick = spritePress;
            base.LoadContent(buttonNormal, true); //load the button background
            this.Position = new Vector2(x, y); //set the button position where specified
            this.CenterOrigin(); //draw button measuring from center of texture

            buttonText = new HenryText(this.Position, RNSEB.ButtonFont, text);
            buttonText.Color = Color.Red; //set the text color
            this.cm = cm; //store the content manager reference so we can use it later to swap button textures

            this.onClick = onClick; //store the lambda function to call when clicked

            //RNSEB.Win.ClientSizeChanged += new EventHandler<EventArgs>(ResolutionChange); //subscribe to window change event
        }
 public new void ReloadContent()
 {
     buttonText = new HenryText(Position, RNSEB.ButtonFont, "");
     base.ReloadContent();
 }