#pragma once

#include "../item/image.qh"
CLASS(XonoticColorpicker, Image)
	METHOD(XonoticColorpicker, configureXonoticColorpicker, void(entity, entity));
	METHOD(XonoticColorpicker, mousePress, bool(XonoticColorpicker this, vector pos));
	METHOD(XonoticColorpicker, mouseRelease, float(entity, vector));
	METHOD(XonoticColorpicker, mouseDrag, float(entity, vector));
	ATTRIB(XonoticColorpicker, controlledTextbox, entity);
	ATTRIB(XonoticColorpicker, image, string, SKINGFX_COLORPICKER);
	ATTRIB(XonoticColorpicker, imagemargin, vector, SKINMARGIN_COLORPICKER);
	ATTRIB(XonoticColorpicker, focusable, bool, true);
	METHOD(XonoticColorpicker, focusLeave, void(entity));
	METHOD(XonoticColorpicker, keyDown, float(entity, float, float, float));
	METHOD(XonoticColorpicker, draw, void(entity));
ENDCLASS(XonoticColorpicker)
entity makeXonoticColorpicker(entity theTextbox);

vector color_hslimage(vector v, vector margin);
vector hslimage_color(vector v, vector margin);
