#pragma once

#include "colorpicker.qh"

#include "../item/image.qh"
CLASS(XonoticColorpickerString, Image)
	METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string));
	METHOD(XonoticColorpickerString, mousePress, bool(XonoticColorpickerString this, vector pos));
	METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector));
	METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector));

	ATTRIB(XonoticColorpickerString, controlledCvar, string);
	METHOD(XonoticColorpickerString, loadCvars, void(entity));
	METHOD(XonoticColorpickerString, saveCvars, void(entity));

	ATTRIB(XonoticColorpickerString, prevcoords, vector, '0 0 0');
	ATTRIB(XonoticColorpickerString, image, string, SKINGFX_COLORPICKER);
	ATTRIB(XonoticColorpickerString, imagemargin, vector, SKINMARGIN_COLORPICKER);
	ATTRIB(XonoticColorpickerString, focusable, bool, true);
	METHOD(XonoticColorpickerString, draw, void(entity));
	ATTRIB(XonoticColorpickerString, disabledAlpha, float, 0.3);
ENDCLASS(XonoticColorpickerString)
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar);
