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_T(0, "cl_port",
31 _("Force client to use chosen port unless it is set to 0")));
34 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth:")));
35 me.TD(me, 1, 2, e = makeXonoticTextSlider_T("_cl_rate",
36 _("Specify your network speed")));
37 e.addValue(e, _("56k"), "4000");
38 e.addValue(e, _("ISDN"), "7000");
39 e.addValue(e, _("Slow ADSL"), "15000");
40 e.addValue(e, _("Fast ADSL"), "20000");
41 e.addValue(e, _("Broadband"), "66666");
42 e.configureXonoticTextSliderValues(e);
44 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
45 me.TD(me, 1, 2, e = makeXonoticSlider_T(20, 100, 5, "cl_netfps",
46 _("How many input packets to send to the server each second")));
48 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Server queries/s:")));
49 me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 10, "net_slist_queriespersecond"));
52 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Downloads:")));
53 me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads",
54 _("Maximum number of concurrent HTTP/FTP downloads")));
57 me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
58 me.TD(me, 1, 2, e = makeXonoticSlider_T(10, 2000, 50, "cl_curl_maxspeed",
59 _("Maximum download speed")));
63 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
64 me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
67 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "shownetgraph", _("Show netgraph"),
68 _("Show a graph of packet sizes and other information")));
70 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction")));
72 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation")));
73 setDependent(e, "cl_movement", 1, 1);
75 if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE)
76 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); // TODO: move up
78 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
79 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Framerate")));
81 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Maximum:")));
82 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps"));
83 e.addValue(e, ZCTX(_("MAXFPS^5 fps")), "5");
84 e.addValue(e, ZCTX(_("MAXFPS^10 fps")), "10");
85 e.addValue(e, ZCTX(_("MAXFPS^20 fps")), "20");
86 e.addValue(e, ZCTX(_("MAXFPS^30 fps")), "30");
87 e.addValue(e, ZCTX(_("MAXFPS^40 fps")), "40");
88 e.addValue(e, ZCTX(_("MAXFPS^50 fps")), "50");
89 e.addValue(e, ZCTX(_("MAXFPS^60 fps")), "60");
90 e.addValue(e, ZCTX(_("MAXFPS^70 fps")), "70");
91 e.addValue(e, ZCTX(_("MAXFPS^100 fps")), "100");
92 e.addValue(e, ZCTX(_("MAXFPS^125 fps")), "125");
93 e.addValue(e, ZCTX(_("MAXFPS^200 fps")), "200");
94 e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0");
95 e.configureXonoticTextSliderValues(e);
97 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Target:")));
98 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_minfps"));
99 e.addValue(e, ZCTX(_("TRGT^Disabled")), "0");
100 e.addValue(e, ZCTX(_("TRGT^30 fps")), "30");
101 e.addValue(e, ZCTX(_("TRGT^40 fps")), "40");
102 e.addValue(e, ZCTX(_("TRGT^50 fps")), "50");
103 e.addValue(e, ZCTX(_("TRGT^60 fps")), "60");
104 e.addValue(e, ZCTX(_("TRGT^100 fps")), "100");
105 e.addValue(e, ZCTX(_("TRGT^125 fps")), "125");
106 e.addValue(e, ZCTX(_("TRGT^200 fps")), "200");
107 e.configureXonoticTextSliderValues(e);
109 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Idle limit:")));
110 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxidlefps"));
111 e.addValue(e, ZCTX(_("IDLFPS^10 fps")), "10");
112 e.addValue(e, ZCTX(_("IDLFPS^20 fps")), "20");
113 e.addValue(e, ZCTX(_("IDLFPS^30 fps")), "30");
114 e.addValue(e, ZCTX(_("IDLFPS^60 fps")), "60");
115 e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0");
116 e.configureXonoticTextSliderValues(e);
119 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Save processing time for other apps")));
120 setDependent(e, "cl_maxfps", 1, 1000);
122 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showfps", _("Show frames per second"),
123 _("Show your rendered frames per second")));
126 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
128 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
129 me.TD(me, 1, 2, e = makeXonoticTextSlider_T("menu_tooltips",
130 _("Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item)")));
131 e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0");
132 e.addValue(e, ZCTX(_("TLTIP^Standard")), "1");
133 e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2");
134 e.configureXonoticTextSliderValues(e);
136 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showtime", _("Show current date and time"),
137 _("Show current date and time of day, useful on screenshots")));
138 makeMulti(e, "showdate");
140 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode")));
144 me.TD(me, 1, 2, e = makeXonoticButton_T(_("Advanced settings..."), '0 0 0',
145 _("Advanced settings where you can tweak every single variable of the game")));
146 e.onClick = DialogOpenButton_Click;
147 e.onClickEntity = main.cvarsDialog;
150 me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '0 0 0'));
151 e.onClick = DialogOpenButton_Click;
152 e.onClickEntity = main.resetDialog;