#pragma once

#include "modalcontroller.qh"

#include "label.qh"
CLASS(Button, Label)
	METHOD(Button, configureButton, void(entity, string, float, string));
	METHOD(Button, draw, void(entity));
	METHOD(Button, showNotify, void(entity));
	METHOD(Button, resizeNotify, void(entity, vector, vector, vector, vector));
	METHOD(Button, keyDown, float(entity, float, float, float));
	METHOD(Button, mousePress, bool(Button this, vector pos));
	METHOD(Button, mouseDrag, float(entity, vector));
	METHOD(Button, mouseRelease, float(entity, vector));
	METHOD(Button, playClickSound, void(entity));
	ATTRIB(Button, onClick, void(entity, entity));
	ATTRIB(Button, onClickEntity, entity);
	ATTRIB(Button, src, string);
	ATTRIB(Button, srcSuffix, string);
	ATTRIB(Button, src2, string); // is centered, same aspect, and stretched to label size
	ATTRIB(Button, src2scale, float, 1);
	ATTRIB(Button, srcMulti, float, 1);        // 0: button square left, text right; 1: button stretched, text over it
	ATTRIB(Button, focusable, bool, true);
	ATTRIB(Button, allowFocusSound, bool, true);
	ATTRIB(Button, pressed, float, 0);
	ATTRIB(Button, clickTime, float, 0);
	ATTRIB(Button, applyButton, entity);
	ATTRIB(Button, disableOnClick, bool, false);
	ATTRIB(Button, disabled, float, 0);
	ATTRIB(Button, disabledAlpha, float, 0.3);
	ATTRIB(Button, forcePressed, bool, false);
	ATTRIB(Button, pulse, bool, false);
	ATTRIB(Button, color, vector, '1 1 1');
	ATTRIB(Button, colorC, vector, '1 1 1');
	ATTRIB(Button, colorF, vector, '1 1 1');
	ATTRIB(Button, colorD, vector, '1 1 1');
	ATTRIB(Button, color2, vector, '1 1 1');
	ATTRIB(Button, alpha2, float, 1);

	ATTRIB(Button, origin, vector, '0 0 0');
	ATTRIB(Button, size, vector, '0 0 0');
ENDCLASS(Button)
