1 #ifndef TABCONTROLLER_H
2 #define TABCONTROLLER_H
3 #include "../item/modalcontroller.qc"
4 CLASS(XonoticTabController, ModalController)
5 METHOD(XonoticTabController, configureXonoticTabController, void(entity, float));
6 METHOD(XonoticTabController, makeTabButton_T, entity(entity, string, entity, string));
7 METHOD(XonoticTabController, makeTabButton, entity(entity, string, entity));
8 ATTRIB(XonoticTabController, rows, float, 0)
9 ATTRIB(XonoticTabController, fontSize, float, SKINFONTSIZE_NORMAL)
10 ATTRIB(XonoticTabController, image, string, SKINGFX_BUTTON)
11 ENDCLASS(XonoticTabController)
12 entity makeXonoticTabController(float theRows);
16 entity makeXonoticTabController(float theRows)
19 me = NEW(XonoticTabController);
20 me.configureXonoticTabController(me, theRows);
23 void XonoticTabController_configureXonoticTabController(entity me, float theRows)
27 entity XonoticTabController_makeTabButton_T(entity me, string theTitle, entity tab, string theTooltip)
30 if(me.rows != tab.rows)
31 error("Tab dialog height mismatch!");
32 b = makeXonoticButton_T(theTitle, '0 0 0', theTooltip);
33 me.addTab(me, tab, b);
34 // TODO make this real tab buttons (with color parameters, and different gfx)
37 entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab)
39 return XonoticTabController_makeTabButton_T(me, theTitle, tab, string_null);