package projectzombie.menu.gui;

import gl_engine.vec.Vec2d;

public class GUIButtonBasic extends GUIButton {
	
	private GUIButtonCallback callback;
	
	public GUIButtonBasic(String text, GUIButtonCallback callback) {
		setText(text);
		
		this.callback = callback;
	}
	
	public GUIButtonBasic(String text, Vec2d pos, GUIButtonCallback callback) {
		this(text, callback);
		
		setPos(pos);
	}
	
	@Override
	public void onMouseClick(Vec2d pos) {
		super.onMouseClick(pos);
		
		callback.onClick(this);
	}
}
