]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/util.qh
Merge branch 'master' into Mario/bulldozer
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qh
1 #ifndef MENU_UTIL_H
2 #define MENU_UTIL_H
3
4 float GL_CheckExtension(string ext);
5 float GL_Have_TextureCompression();
6
7 void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
8 void saveAllCvars(entity root);
9 void loadAllCvars(entity root);
10
11 void makeMulti(entity me, string otherCvars);
12 string getCvarsMulti(entity me);
13 void makeCallback(entity me, entity cbent, void(entity, entity) cbfunc);
14
15 void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax);
16 void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
17 void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
18 void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max);
19 void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue);
20 void setDependentWeird(entity e, float(entity) func);
21
22 void setZonedTooltip(entity e, string theTooltip, string theCvar);
23 void clearTooltip(entity e);
24
25 string resolvemod(string m);
26
27 float updateCompression();
28
29 void UpdateNotification_URI_Get_Callback(float id, float status, string data);
30
31 // game type list box stuff (does not NEED to contain all game types, other
32 // types stay available via console)
33 int GameType_GetID(int cnt);
34 string GameType_GetName(int cnt);
35 string GameType_GetIcon(int cnt);
36 //string GameType_GetTeams(float cnt);
37 int GameType_GetCount();
38
39 void dialog_hudpanel_common_notoggle(entity me, string panelname);
40 #define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
41         dialog_hudpanel_common_notoggle(me, panelname)
42 #define DIALOG_HUDPANEL_COMMON() \
43         me.TR(me); \
44                 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
45         DIALOG_HUDPANEL_COMMON_NOTOGGLE()
46
47 float getFadedAlpha(float currentAlpha, float startAlpha, float targetAlpha);
48
49 string _Nex_ExtResponseSystem_BannedServers;
50 float _Nex_ExtResponseSystem_BannedServersNeedsRefresh;
51 string _Nex_ExtResponseSystem_PromotedServers;
52 float _Nex_ExtResponseSystem_PromotedServersNeedsRefresh;
53 string _Nex_ExtResponseSystem_RecommendedServers;
54 float _Nex_ExtResponseSystem_RecommendedServersNeedsRefresh;
55
56 void CheckSendCvars(entity me, string cvarnamestring);
57 #endif