#pragma once

#include "../item/textslider.qh"
CLASS(XonoticTextSlider, TextSlider)
	METHOD(XonoticTextSlider, configureXonoticTextSlider, void(entity, string, string));
	METHOD(XonoticTextSlider, setValue, void(entity, float, bool));
	METHOD(XonoticTextSlider, setValueSpace, void(entity, float));
	METHOD(XonoticTextSlider, configureXonoticTextSliderValues, void(entity));
	ATTRIB(XonoticTextSlider, fontSize, float, SKINFONTSIZE_NORMAL);
	ATTRIB(XonoticTextSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT);
	ATTRIB(XonoticTextSlider, image, string, SKINGFX_SLIDER);
	ATTRIB(XonoticTextSlider, tolerance, vector, '0.2 2 0');
	ATTRIB(XonoticTextSlider, align, float, 0.5);
	ATTRIB(XonoticTextSlider, color, vector, SKINCOLOR_SLIDER_N);
	ATTRIB(XonoticTextSlider, colorC, vector, SKINCOLOR_SLIDER_C);
	ATTRIB(XonoticTextSlider, colorF, vector, SKINCOLOR_SLIDER_F);
	ATTRIB(XonoticTextSlider, colorD, vector, SKINCOLOR_SLIDER_D);
	ATTRIB(XonoticTextSlider, color2, vector, SKINCOLOR_SLIDER_S);

	ATTRIB(XonoticTextSlider, controlledCvar, string);
	METHOD(XonoticTextSlider, loadCvars, void(entity));
	METHOD(XonoticTextSlider, saveCvars, void(entity));
	ATTRIB(XonoticTextSlider, sendCvars, float, 0);

	ATTRIB(XonoticTextSlider, alpha, float, SKINALPHA_TEXT);
	ATTRIB(XonoticTextSlider, disabledAlpha, float, SKINALPHA_DISABLED);
ENDCLASS(XonoticTextSlider)
entity makeXonoticTextSlider_T(string, string theTooltip);
entity makeXonoticTextSlider(string);  // note: you still need to call addValue and configureXonoticTextSliderValues!
