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, entity(entity, string, entity));
7 ATTRIB(XonoticTabController, rows, float, 0)
8 ATTRIB(XonoticTabController, fontSize, float, SKINFONTSIZE_NORMAL)
9 ATTRIB(XonoticTabController, image, string, SKINGFX_BUTTON)
10 ENDCLASS(XonoticTabController)
11 entity makeXonoticTabController(float theRows);
15 entity makeXonoticTabController(float theRows)
18 me = NEW(XonoticTabController);
19 me.configureXonoticTabController(me, theRows);
22 void XonoticTabController_configureXonoticTabController(entity me, float theRows)
26 entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab)
29 if(me.rows != tab.rows)
30 error("Tab dialog height mismatch!");
31 b = makeXonoticButton(theTitle, '0 0 0');
32 me.addTab(me, tab, b);
33 // TODO make this real tab buttons (with color parameters, and different gfx)