]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/tabcontroller.qc
take3: format 903 files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / tabcontroller.qc
1 #include "tabcontroller.qh"
2
3 #include "button.qh"
4
5 entity makeXonoticTabController(float theRows)
6 {
7         entity me;
8         me = NEW(XonoticTabController);
9         me.configureXonoticTabController(me, theRows);
10         return me;
11 }
12 void XonoticTabController_configureXonoticTabController(entity me, float theRows)
13 {
14         me.rows = theRows;
15 }
16 entity XonoticTabController_makeTabButton_T(entity me, string theTitle, entity tab, string theTooltip)
17 {
18         entity b;
19         if (me.rows != tab.rows) {
20                 error("Tab dialog height mismatch!");
21         }
22         b = makeXonoticButton_T(theTitle, '0 0 0', theTooltip);
23         me.addTab(me, tab, b);
24         // TODO make this real tab buttons (with color parameters, and different gfx)
25         return b;
26 }
27 entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab)
28 {
29         return XonoticTabController_makeTabButton_T(me, theTitle, tab, string_null);
30 }