Esempio n. 1
0
        public virtual void draw(SpriteBatch spriteBatch, buttonInteractionState interactionState)
        {
            Color colorToUse = color;

            if (interactionState == buttonInteractionState.mousedOver)
            {
                colorToUse = mousedOverColor;
            }

            spriteBatch.Draw(getTexture(), getRectangle(), colorToUse);
        }
Esempio n. 2
0
 public override void draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, buttonInteractionState state)
 {
     for (int i = 0; i < children.Count; i++)
     {
         state = buttonInteractionState.none;
         if (i == currentlySelectedIndex)
         {
             state = buttonInteractionState.mousedOver;
         }
         children[i].draw(spriteBatch, state);
     }
 }