]> de.git.xonotic.org Git - voretournament/voretournament.git/blob - data/qcsrc/menu/voret/tabcontroller.c
Tweak the Effects menu, and add iris adaptation to it as well.
[voretournament/voretournament.git] / data / qcsrc / menu / voret / tabcontroller.c
1 #ifdef INTERFACE\r
2 CLASS(VoretTabController) EXTENDS(ModalController)\r
3         METHOD(VoretTabController, configureVoretTabController, void(entity, float))\r
4         METHOD(VoretTabController, makeTabButton, entity(entity, string, entity))\r
5         ATTRIB(VoretTabController, rows, float, 0)\r
6         ATTRIB(VoretTabController, fontSize, float, SKINFONTSIZE_NORMAL)\r
7         ATTRIB(VoretTabController, image, string, SKINGFX_BUTTON)\r
8 ENDCLASS(VoretTabController)\r
9 entity makeVoretTabController(float theRows);\r
10 #endif\r
11 \r
12 #ifdef IMPLEMENTATION\r
13 entity makeVoretTabController(float theRows)\r
14 {\r
15         entity me;\r
16         me = spawnVoretTabController();\r
17         me.configureVoretTabController(me, theRows);\r
18         return me;\r
19 }\r
20 void configureVoretTabControllerVoretTabController(entity me, float theRows)\r
21 {\r
22         me.rows = theRows;\r
23 }\r
24 entity makeTabButtonVoretTabController(entity me, string theTitle, entity tab)\r
25 {\r
26         entity b;\r
27         if(me.rows != tab.rows)\r
28                 error("Tab dialog height mismatch!");\r
29         b = makeVoretButton(theTitle, '0 0 0');\r
30                 me.addTab(me, tab, b);\r
31         // TODO make this real tab buttons (with color parameters, and different gfx)\r
32         return b;\r
33 }\r
34 #endif\r