public void Update(MouseState mouse)
{
Rectangle mouseRec = new Rectangle((int)mouse.X, (int)mouse.Y, (int)sizeArrow.X, (int)sizeArrow.Y);
if (recArrowLeft.Intersects(mouseRec))
{
if (mouse.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed && mouseReleased == true)
{
if (arrayNumber != arVolumes.Count() - 1)
{
arrayNumber++;
MoveCurser(arVolumes[arrayNumber][0]);
ChangeVolume(arVolumes[arrayNumber][1]);
}
mouseReleased = false;
}
}
if (recArrowRight.Intersects(mouseRec))
{
if (mouse.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed && mouseReleased == true)
{
if (arrayNumber != 0)
{
arrayNumber--;
MoveCurser(arVolumes[arrayNumber][0]);
ChangeVolume(arVolumes[arrayNumber][1]);
}
mouseReleased = false;
}
}
if (mouse.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Released)
{
mouseReleased = true;
}
}