package speiger.src.coreengine.rendering.guiOld.base;

import speiger.src.coreengine.rendering.guiOld.GuiComponent;

public interface IButtonComponent extends IInputComponent
{

	public default boolean isComponentColliding(int mouseX, int mouseY)
	{
		return ((GuiComponent)this).isHovered(mouseX, mouseY);
	}
	
	public default float getComponentZ()
	{
		return this instanceof GuiComponent ? ((GuiComponent)this).calculateZLevel() : 0F;
	}
	
	public default boolean isValidButton(int button)
	{
		return button == 0;
	}
	
	public default boolean onClick(int button, int mouseX, int mouseY)
	{
		return true;
	}
	
	public default boolean onDrag(int mouseX, int mouseY)
	{
		return false;
	}
	
	public default void onRelease(int button, int mouseX, int mouseY)
	{
		
	}
	
	public default boolean onScroll(int scroll, int mouseX, int mouseY)
	{
		return false;
	}
	
	public default boolean canMoveIntoForground()
	{
		return false;
	}
	
	public default void onFocusLost()
	{
		
	}
}
