package depart.frontal.vues;

import ca.ntro.app.Ntro;
import ca.ntro.app.frontend.ViewFx;
import depart.commun.monde2d.MondeDepart2d;
import depart.frontal.controles.CanvasB;
import depart.frontal.evenements.EvtA;
import javafx.fxml.FXML;
import javafx.scene.control.Button;

public class VueB extends ViewFx {

	@FXML
	private Button boutonA;

	@FXML
	private CanvasB canvas;

	@Override
	public void initialize() {
		Ntro.assertNotNull(boutonA);
		Ntro.assertNotNull(canvas);
		
		boutonA.setOnAction(evtFx -> {

			Ntro.newEvent(EvtA.class).trigger();
			
		});
	}

	public void methodeA(MondeDepart2d monde2d) {
		monde2d.drawOn(canvas);
	}

}
