public void update(float tslf)
	{
		x += xspeed * tslf;
		if(x > 0)
		{
			x = 0;
			xspeed *= -1;
		} else if(x < -background.getWidth() + Main.width)
		{
			x = -background.getWidth() + Main.width;
			xspeed *= -1;
		}
		for(int i = 0; i < buttons.length; i++)
		{
			if(buttons[i].update())
			{
				sound.play();
				sound.setVolume(6);
				if(i == 0) Frame.gamestate = 1;
				else if(i == 1);
				else if(i == 2) System.exit(0);
			}
		}
			
	}