1 #ifndef DIALOG_SETTINGS_MISC_H
2 #define DIALOG_SETTINGS_MISC_H
4 CLASS(XonoticMiscSettingsTab, XonoticTab)
5 METHOD(XonoticMiscSettingsTab, fill, void(entity))
6 ATTRIB(XonoticMiscSettingsTab, title, string, _("Misc"))
7 ATTRIB(XonoticMiscSettingsTab, intendedWidth, float, 0.9)
8 ATTRIB(XonoticMiscSettingsTab, rows, float, 15.5)
9 ATTRIB(XonoticMiscSettingsTab, columns, float, 6.2)
10 ENDCLASS(XonoticMiscSettingsTab)
11 entity makeXonoticMiscSettingsTab();
15 entity makeXonoticMiscSettingsTab()
18 me = NEW(XonoticMiscSettingsTab);
19 me.configureDialog(me);
22 void XonoticMiscSettingsTab_fill(entity me)
28 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network")));
30 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:")));
31 me.TD(me, 1, 1.5, e = makeXonoticInputBox(0, "cl_port"));
34 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth:")));
35 me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate"));
36 e.addValue(e, _("56k"), "4000");
37 e.addValue(e, _("ISDN"), "7000");
38 e.addValue(e, _("Slow ADSL"), "15000");
39 e.addValue(e, _("Fast ADSL"), "20000");
40 e.addValue(e, _("Broadband"), "66666");
41 e.configureXonoticTextSliderValues(e);
43 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
44 me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 5, "cl_netfps"));
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"));
50 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Downloads:")));
51 me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads"));
54 me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
55 me.TD(me, 1, 2, e = makeXonoticSlider(10, 2000, 50, "cl_curl_maxspeed"));
59 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
60 me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
63 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", _("Show netgraph")));
65 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction")));
67 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation")));
68 setDependent(e, "cl_movement", 1, 1);
70 if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE)
71 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up
73 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
74 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate")));
76 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:")));
77 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps"));
78 e.addValue(e, ZCTX(_("MAXFPS^5 fps")), "5");
79 e.addValue(e, ZCTX(_("MAXFPS^10 fps")), "10");
80 e.addValue(e, ZCTX(_("MAXFPS^20 fps")), "20");
81 e.addValue(e, ZCTX(_("MAXFPS^30 fps")), "30");
82 e.addValue(e, ZCTX(_("MAXFPS^40 fps")), "40");
83 e.addValue(e, ZCTX(_("MAXFPS^50 fps")), "50");
84 e.addValue(e, ZCTX(_("MAXFPS^60 fps")), "60");
85 e.addValue(e, ZCTX(_("MAXFPS^70 fps")), "70");
86 e.addValue(e, ZCTX(_("MAXFPS^100 fps")), "100");
87 e.addValue(e, ZCTX(_("MAXFPS^125 fps")), "125");
88 e.addValue(e, ZCTX(_("MAXFPS^200 fps")), "200");
89 e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0");
90 e.configureXonoticTextSliderValues(e);
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 e.addValue(e, ZCTX(_("TRGT^30 fps")), "30");
96 e.addValue(e, ZCTX(_("TRGT^40 fps")), "40");
97 e.addValue(e, ZCTX(_("TRGT^50 fps")), "50");
98 e.addValue(e, ZCTX(_("TRGT^60 fps")), "60");
99 e.addValue(e, ZCTX(_("TRGT^100 fps")), "100");
100 e.addValue(e, ZCTX(_("TRGT^125 fps")), "125");
101 e.addValue(e, ZCTX(_("TRGT^200 fps")), "200");
102 e.configureXonoticTextSliderValues(e);
104 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Idle limit:")));
105 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxidlefps"));
106 e.addValue(e, ZCTX(_("IDLFPS^10 fps")), "10");
107 e.addValue(e, ZCTX(_("IDLFPS^20 fps")), "20");
108 e.addValue(e, ZCTX(_("IDLFPS^30 fps")), "30");
109 e.addValue(e, ZCTX(_("IDLFPS^60 fps")), "60");
110 e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0");
111 e.configureXonoticTextSliderValues(e);
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);
117 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second")));
120 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
122 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
123 me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips"));
124 e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0");
125 e.addValue(e, ZCTX(_("TLTIP^Standard")), "1");
126 e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2");
127 e.configureXonoticTextSliderValues(e);
129 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current date and time")));
130 makeMulti(e, "showdate");
132 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode")));
136 me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
137 e.onClick = DialogOpenButton_Click;
138 e.onClickEntity = main.cvarsDialog;
141 me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '0 0 0'));
142 e.onClick = DialogOpenButton_Click;
143 e.onClickEntity = main.resetDialog;