import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class vcrJPanel2 extends JPanel
{
	//Temporary Variables:
	int done = 100;
	int damage = 0;
	int time = 60;
	
	JLabel blank2 = new JLabel("-------------------------------------");
	//JLabel blank3 = new JLabel("-------------------------------------");
	JLabel blank7 = new JLabel("-------------------------------------");
	JLabel blank8 = new JLabel("-------------------------------------");

	JLabel a = new JLabel("         % Done =");
	//JLabel aa = new JLabel(" "+done+"%        ");
	JLabel aa = new JLabel("                ");
	JLabel b = new JLabel("         Health =");
	//JLabel bb = new JLabel(" "+damage+"%       ");
	JLabel bb = new JLabel("               ");

	//JLabel c = new JLabel("           Time Left=");
	//JLabel cc = new JLabel(" "+time+" Seconds       ");     
	JButton d = new JButton("  Reset Playback   ");
	JButton e = new JButton("  Start Playback  ");
	JButton g = new JButton(" Return to Main Menu ");
	JLabel h = new JLabel("Current Vehicle: ");
	JLabel i = new JLabel("Current Course:  ");
	JLabel j = new JLabel("Current Weather: ");


	
	obstacle myObstacle;
	track myTrack;
	car myCar;
	 
	public vcrJPanel2(obstacle inputObstacle, track inputTrack, car inputCar)
	{
		myObstacle = inputObstacle;
		myTrack = inputTrack;
		myCar = inputCar;
		
		String h2 = "Current Vehicle: " + inputCar.carName;
		String i2 = "Current Course: " + inputTrack.trackName;
		String j2 = "Current Weather: " + inputTrack.trackWeatherName;

		h = new JLabel(h2);
		i = new JLabel(i2);
		j = new JLabel(j2);

		setBackground(Color.white);
		add(a);
		add(aa);
		add(b);
		add(bb);
		add(blank2);
		//add(c);
		//add(cc);
		//add(blank3);
		add(e);
		add(d);
		add(g);
		add(blank7);
		add(h);
		add(i);
		add(j);
		add(blank8);
	
     		 	
	
	}
	public void paintComponent(Graphics g) 
	{
    		super.paintComponent(g); 
    		Image myImage = Toolkit.getDefaultToolkit().getImage("aerial_track.jpg");
    		g.drawImage(myImage, 0, 0, this);

		g.setColor(Color.black);

		//%done
		int trackPercent = myTrack.trackPercent;
		g.drawString(trackPercent + "%",115,18);

		//Health
		int carPercent = (myCar.carHealth*100/myCar.carHealthMax);
		g.drawString(carPercent + "%",115,39);
    }

	// actionPerformed
    

}