#pragma once

#include "listbox.qh"
CLASS(XonoticCampaignList, XonoticListBox)
	METHOD(XonoticCampaignList, configureXonoticCampaignList, void(entity));
	ATTRIB(XonoticCampaignList, rowsPerItem, float, 10);
	METHOD(XonoticCampaignList, draw, void(entity));
	METHOD(XonoticCampaignList, drawListBoxItem, void(entity, int, vector, bool, bool));
	METHOD(XonoticCampaignList, doubleClickListBoxItem, void(entity, float, vector));
	METHOD(XonoticCampaignList, resizeNotify, void(entity, vector, vector, vector, vector));
	METHOD(XonoticCampaignList, setSelected, void(entity, float));
	METHOD(XonoticCampaignList, keyDown, float(entity, float, float, float));
	METHOD(XonoticCampaignList, campaignGo, void(entity, float));
	METHOD(XonoticCampaignList, destroy, void(entity));

	ATTRIB(XonoticCampaignList, campaignGlob, float, 0);
	ATTRIB(XonoticCampaignList, realFontSize, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, columnPreviewOrigin, float, 0);
	ATTRIB(XonoticCampaignList, columnPreviewSize, float, 0);
	ATTRIB(XonoticCampaignList, columnNameOrigin, float, 0);
	ATTRIB(XonoticCampaignList, columnNameSize, float, 0);
	ATTRIB(XonoticCampaignList, columnCheckMarkOrigin, float, 0);
	ATTRIB(XonoticCampaignList, columnCheckMarkSize, float, 0);
	ATTRIB(XonoticCampaignList, checkMarkOrigin, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, checkMarkSize, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, typeIconOrigin, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, typeIconSize, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, realUpperMargin1, float, 0);
	ATTRIB(XonoticCampaignList, realUpperMargin2, float, 0);

	ATTRIB(XonoticCampaignList, origin, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, itemAbsSize, vector, '0 0 0');
	ATTRIB(XonoticCampaignList, emptyLineHeight, float, 0.5);

	ATTRIB(XonoticCampaignList, campaignIndex, float, 0);
	ATTRIB(XonoticCampaignList, controlledCvar, string);
	METHOD(XonoticCampaignList, loadCvars, void(entity));
	METHOD(XonoticCampaignList, saveCvars, void(entity));
	ATTRIB(XonoticCampaignList, hasNextCampaign, bool, false);
	ATTRIB(XonoticCampaignList, hasPrevCampaign, bool, false);

	ATTRIB(XonoticCampaignList, buttonNext, entity);
	ATTRIB(XonoticCampaignList, buttonPrev, entity);
	ATTRIB(XonoticCampaignList, labelTitle, entity);
ENDCLASS(XonoticCampaignList)
entity makeXonoticCampaignList();
void CampaignList_LoadMap(entity btn, entity me);
void MultiCampaign_Next(entity btn, entity me);
void MultiCampaign_Prev(entity btn, entity me);
