]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_settings_misc.qc
Remove some stupid maximum FPS settings and add 80 as an option for 75hz monitors
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_misc.qc
1 #include "dialog_settings_misc.qh"
2
3 #include "textlabel.qh"
4 #include "inputbox.qh"
5 #include "textslider.qh"
6 #include "slider.qh"
7 #include "checkbox.qh"
8 #include "button.qh"
9 #include "mainwindow.qh"
10
11 #define ADDVALUE_FPS(i) e.addValue(e, strzone(sprintf(_("%d fps"), i)), #i)
12 entity makeXonoticMiscSettingsTab()
13 {
14         entity me;
15         me = NEW(XonoticMiscSettingsTab);
16         me.configureDialog(me);
17         return me;
18 }
19 void XonoticMiscSettingsTab_fill(entity me)
20 {
21         entity e;
22         //entity sk;
23
24         me.TR(me);
25                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network")));
26         me.TR(me);
27                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:")));
28                 me.TD(me, 1, 1.5, e = makeXonoticInputBox_T(0, "cl_port",
29                         _("Force client to use chosen port unless it is set to 0")));
30         me.TR(me);
31         me.TR(me);
32                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth:")));
33                 me.TD(me, 1, 2, e = makeXonoticTextSlider_T("_cl_rate",
34                         _("Specify your network speed")));
35                         e.addValue(e, _("56k"), "4000");
36                         e.addValue(e, _("ISDN"), "7000");
37                         e.addValue(e, _("Slow ADSL"), "15000");
38                         e.addValue(e, _("Fast ADSL"), "20000");
39                         e.addValue(e, _("Broadband"), "66666");
40                         e.configureXonoticTextSliderValues(e);
41         me.TR(me);
42                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
43                 me.TD(me, 1, 2, e = makeXonoticSlider_T(20, 100, 5, "cl_netfps",
44                         _("How many input packets to send to the server each second")));
45         me.TR(me);
46                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Server queries/s:")));
47                 me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 10, "net_slist_queriespersecond"));
48         me.TR(me);
49         me.TR(me);
50                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Downloads:")));
51                 me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads",
52                         _("Maximum number of concurrent HTTP/FTP downloads")));
53         me.TR(me);
54                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
55                 me.TD(me, 1, 2, e = makeXonoticSlider_T(10, 2000, 50, "cl_curl_maxspeed",
56                         _("Maximum download speed")));
57         me.TR(me);
58                 if(cvar("developer"))
59                 {
60                         me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
61                         me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
62                 }
63         me.TR(me);
64                 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "shownetgraph", _("Show netgraph"),
65                         _("Show a graph of packet sizes and other information")));
66         me.TR(me);
67                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction")));
68         me.TR(me);
69                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation")));
70                 setDependent(e, "cl_movement", 1, 1);
71         me.TR(me);
72                 if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE)
73                         me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up
74
75         me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
76                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate")));
77         me.TR(me);
78                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:")));
79                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps"));
80                         ADDVALUE_FPS(30);
81                         ADDVALUE_FPS(40);
82                         ADDVALUE_FPS(50);
83                         ADDVALUE_FPS(60);
84                         ADDVALUE_FPS(70);
85                         ADDVALUE_FPS(80);
86                         ADDVALUE_FPS(100);
87                         ADDVALUE_FPS(125);
88                         ADDVALUE_FPS(200);
89                         e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0");
90                         e.configureXonoticTextSliderValues(e);
91         me.TR(me);
92                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Target:")));
93                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_minfps"));
94                         e.addValue(e, ZCTX(_("TRGT^Disabled")), "0");
95                         ADDVALUE_FPS(30);
96                         ADDVALUE_FPS(40);
97                         ADDVALUE_FPS(50);
98                         ADDVALUE_FPS(60);
99                         ADDVALUE_FPS(100);
100                         ADDVALUE_FPS(125);
101                         ADDVALUE_FPS(200);
102                         e.configureXonoticTextSliderValues(e);
103         me.TR(me);
104                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Idle limit:")));
105                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxidlefps"));
106                         ADDVALUE_FPS(10);
107                         ADDVALUE_FPS(20);
108                         ADDVALUE_FPS(30);
109                         ADDVALUE_FPS(60);
110                         e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0");
111                         e.configureXonoticTextSliderValues(e);
112         me.TR(me);
113         me.TR(me);
114                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Save processing time for other apps")));
115                 setDependent(e, "cl_maxfps", 1, 1000);
116         me.TR(me);
117                 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showfps", _("Show frames per second"),
118                         _("Show your rendered frames per second")));
119         me.TR(me);
120         me.TR(me);
121                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
122         me.TR(me);
123                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
124                 me.TD(me, 1, 2, e = makeXonoticTextSlider_T("menu_tooltips",
125                         _("Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item)")));
126                         e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0");
127                         e.addValue(e, ZCTX(_("TLTIP^Standard")), "1");
128                         e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2");
129                         e.configureXonoticTextSliderValues(e);
130         me.TR(me);
131                 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showtime", _("Show current date and time"),
132                         _("Show current date and time of day, useful on screenshots")));
133                         makeMulti(e, "showdate");
134         me.TR(me);
135                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode")));
136
137         me.TR(me);
138                 me.TDempty(me, 0.5);
139                 me.TD(me, 1, 2, e = makeXonoticButton_T(_("Advanced settings..."), '0 0 0',
140                         _("Advanced settings where you can tweak every single variable of the game")));
141                         e.onClick = DialogOpenButton_Click;
142                         e.onClickEntity = main.cvarsDialog;
143         me.TR(me);
144                 me.TDempty(me, 0.5);
145                 me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '0 0 0'));
146                         e.onClick = DialogOpenButton_Click;
147                         e.onClickEntity = main.resetDialog;
148 }
149 #undef ADDVALUE_FPS