package Menu;
import DreamBubbleMidlet;

import java.io.IOException;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class Help extends Canvas {

	private DreamBubbleMidlet dreamBubbleMidlet;
	private Image help;

	public Help(DreamBubbleMidlet dreamBubbleMidlet) {
		this.setFullScreenMode(true);
		this.dreamBubbleMidlet = dreamBubbleMidlet;

		try {
			this.help = Image.createImage("/Help/Help.png");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	

	protected void keyPressed(int keyCode) {
		showNextScreen();
	}


	public void paint(Graphics g) {
		g.drawImage(this.help, this.getWidth() / 2, this.getHeight() / 2,
				Graphics.HCENTER | Graphics.VCENTER);
	}
	
	public void showMe(){
		this.dreamBubbleMidlet.show(this);
	}
	
	public void showNextScreen(){
		this.dreamBubbleMidlet.menu.showMe();
	}
}
