package theGhastModding.midiPlayer.resources;

import java.awt.image.BufferedImage;

import javax.imageio.ImageIO;
import javax.swing.JOptionPane;

import theGhastModding.midiPlayer.main.TheGhastMidiPlayerMain;

public class Textures {
	
	public static BufferedImage icon;
	public static BufferedImage play;
	public static BufferedImage stop;
	public static BufferedImage pause;
	public static BufferedImage note;
	public static BufferedImage blacknormal;
	public static BufferedImage blackpressed;
	public static BufferedImage whitenormal;
	public static BufferedImage whitepressed;
	public static BufferedImage keys;
	public static BufferedImage whitenormal2;
	public static BufferedImage whitepressed2;
	
	static {
		try {
			icon = ImageIO.read(Textures.class.getResourceAsStream("/material_Icon.png"));
			play = ImageIO.read(Textures.class.getResourceAsStream("/play.png"));
			stop = ImageIO.read(Textures.class.getResourceAsStream("/stop.png"));
			pause = ImageIO.read(Textures.class.getResourceAsStream("/pause.png"));
			keys = ImageIO.read(Textures.class.getResourceAsStream("/keys.png"));
			note = ImageIO.read(Textures.class.getResourceAsStream("/gradient_border.png"));
			blacknormal = ImageIO.read(Textures.class.getResourceAsStream("/keys/blacknormal.png"));
			blackpressed = ImageIO.read(Textures.class.getResourceAsStream("/keys/blackpressed.png"));
			whitenormal = ImageIO.read(Textures.class.getResourceAsStream("/keys/whitenormal.png"));
			whitepressed = ImageIO.read(Textures.class.getResourceAsStream("/keys/whitepressed.png"));
			whitenormal2 = ImageIO.read(Textures.class.getResourceAsStream("/keys/whitenormal2.png"));
			whitepressed2 = ImageIO.read(Textures.class.getResourceAsStream("/keys/whitepressed2.png"));
		}catch(Exception e){
			e.printStackTrace();
			JOptionPane.showMessageDialog(TheGhastMidiPlayerMain.frame, "Error loading textures", "Error", JOptionPane.ERROR_MESSAGE);
			System.exit(1);
		}
	}
	
	public String toString(){
		return "This is just a class to hold static variables. Why did you create an instance of this???";
	}
	
}