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