public virtual void draw(SpriteBatch spriteBatch, buttonInteractionState interactionState) { Color colorToUse = color; if (interactionState == buttonInteractionState.mousedOver) { colorToUse = mousedOverColor; } spriteBatch.Draw(getTexture(), getRectangle(), colorToUse); }
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); } }