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, intendedWidth, float, 0.9)
7 ATTRIB(XonoticMiscSettingsTab, rows, float, 15.5)
8 ATTRIB(XonoticMiscSettingsTab, columns, float, 6.2)
9 ENDCLASS(XonoticMiscSettingsTab)
10 entity makeXonoticMiscSettingsTab();
14 entity makeXonoticMiscSettingsTab()
17 me = NEW(XonoticMiscSettingsTab);
18 me.configureDialog(me);
21 void XonoticMiscSettingsTab_fill(entity me)
27 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network")));
29 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:")));
30 me.TD(me, 1, 1.5, e = makeXonoticInputBox(0, "cl_port"));
33 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth:")));
34 me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate"));
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);
42 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
43 me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 5, "cl_netfps"));
45 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Server queries/s:")));
46 me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 10, "net_slist_queriespersecond"));
49 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Downloads:")));
50 me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads"));
53 me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
54 me.TD(me, 1, 2, e = makeXonoticSlider(10, 2000, 50, "cl_curl_maxspeed"));
58 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
59 me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
62 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", _("Show netgraph")));
64 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction")));
66 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation")));
67 setDependent(e, "cl_movement", 1, 1);
69 if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE)
70 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up
72 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
73 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate")));
75 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:")));
76 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps"));
77 e.addValue(e, ZCTX(_("MAXFPS^5 fps")), "5");
78 e.addValue(e, ZCTX(_("MAXFPS^10 fps")), "10");
79 e.addValue(e, ZCTX(_("MAXFPS^20 fps")), "20");
80 e.addValue(e, ZCTX(_("MAXFPS^30 fps")), "30");
81 e.addValue(e, ZCTX(_("MAXFPS^40 fps")), "40");
82 e.addValue(e, ZCTX(_("MAXFPS^50 fps")), "50");
83 e.addValue(e, ZCTX(_("MAXFPS^60 fps")), "60");
84 e.addValue(e, ZCTX(_("MAXFPS^70 fps")), "70");
85 e.addValue(e, ZCTX(_("MAXFPS^100 fps")), "100");
86 e.addValue(e, ZCTX(_("MAXFPS^125 fps")), "125");
87 e.addValue(e, ZCTX(_("MAXFPS^200 fps")), "200");
88 e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0");
89 e.configureXonoticTextSliderValues(e);
91 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Target:")));
92 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_minfps"));
93 e.addValue(e, ZCTX(_("TRGT^Disabled")), "0");
94 e.addValue(e, ZCTX(_("TRGT^30 fps")), "30");
95 e.addValue(e, ZCTX(_("TRGT^40 fps")), "40");
96 e.addValue(e, ZCTX(_("TRGT^50 fps")), "50");
97 e.addValue(e, ZCTX(_("TRGT^60 fps")), "60");
98 e.addValue(e, ZCTX(_("TRGT^100 fps")), "100");
99 e.addValue(e, ZCTX(_("TRGT^125 fps")), "125");
100 e.addValue(e, ZCTX(_("TRGT^200 fps")), "200");
101 e.configureXonoticTextSliderValues(e);
103 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Idle limit:")));
104 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxidlefps"));
105 e.addValue(e, ZCTX(_("IDLFPS^10 fps")), "10");
106 e.addValue(e, ZCTX(_("IDLFPS^20 fps")), "20");
107 e.addValue(e, ZCTX(_("IDLFPS^30 fps")), "30");
108 e.addValue(e, ZCTX(_("IDLFPS^60 fps")), "60");
109 e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0");
110 e.configureXonoticTextSliderValues(e);
113 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Save processing time for other apps")));
114 setDependent(e, "cl_maxfps", 1, 1000);
116 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second")));
119 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
121 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
122 me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips"));
123 e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0");
124 e.addValue(e, ZCTX(_("TLTIP^Standard")), "1");
125 e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2");
126 e.configureXonoticTextSliderValues(e);
128 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current date and time")));
129 makeMulti(e, "showdate");
131 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode")));
135 me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
136 e.onClick = DialogOpenButton_Click;
137 e.onClickEntity = main.cvarsDialog;
140 me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '0 0 0'));
141 e.onClick = DialogOpenButton_Click;
142 e.onClickEntity = main.resetDialog;