Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_settings_misc.qc
Go to the documentation of this file.
2
3#include "textlabel.qh"
4#include "inputbox.qh"
5#include "mixedslider.qh"
6#include "slider.qh"
7#include "checkbox.qh"
8#include "button.qh"
9#include "mainwindow.qh"
10#include "commandbutton.qh"
11
13{
14 entity me;
16 me.configureDialog(me);
17 return me;
18}
20{
21 entity e;
22 //entity sk;
23
24 entity miscApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_restart", COMMANDBUTTON_APPLY);
25 miscApplyButton.disableOnClick = true;
26
27 me.TR(me);
28 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network")));
29 me.TR(me);
30 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "shownetgraph", _("Show netgraph"),
31 _("Show a graph of packet sizes and other information")));
32 me.TR(me);
33 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_netrepeatinput", _("Packet loss compensation"),
34 _("Each packet includes a copy of the previous message")));
35 me.TR(me);
36 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement prediction error compensation")));
37 setDependent(e, "cl_movement", 1, 1);
38 me.TR(me);
39 if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE)
40 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available")));
41 me.TR(me);
42 me.TR(me);
43 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("HTTP downloads")));
44 me.TR(me);
45 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Simultaneous:")));
46 me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads",
47 _("Maximum number of concurrent HTTP downloads")));
48 me.TR(me);
49 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth limit:")));
50 me.TD(me, 1, 2, e = makeXonoticMixedSlider("cl_curl_maxspeed"));
51 #define ADDVALUE_SPEED_KB(i) e.addText(e, strzone(sprintf(_("%d KiB/s"), i)), i)
52 #define ADDVALUE_SPEED_MB(i, j) e.addText(e, strzone(sprintf(_("%d MiB/s"), i)), j)
57 ADDVALUE_SPEED_MB(1, 1024);
58 ADDVALUE_SPEED_MB(2, 2048);
59 ADDVALUE_SPEED_MB(4, 4096);
60 ADDVALUE_SPEED_MB(8, 8192);
61 #undef ADDVALUE_SPEED_KB
62 #undef ADDVALUE_SPEED_MB
63 e.addText(e, strzone(_("Unlimited")), 0);
64 e.configureXonoticMixedSliderValues(e);
65
66 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
67 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
68 me.TR(me);
69 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:")));
70 me.TD(me, 1, 2, e = makeXonoticMixedSlider_T("menu_tooltips",
71 _("Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item)")));
72 e.setValueSpace(e, e.valueSpace * 1.2);
73 e.addText(e, ZCTX(_("TLTIP^Disabled")), 0);
74 e.addText(e, ZCTX(_("TLTIP^Standard")), 1);
75 e.addText(e, ZCTX(_("TLTIP^Advanced")), 2);
76 e.configureXonoticMixedSliderValues(e);
77 me.TR(me);
78 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu animations:")));
79 me.TD(me, 1, 2, e = makeXonoticMixedSlider_T("menu_animations",
80 _("How fast animations in the menu occur")));
81 e.formatString = "S";
82 e.setValueSpace(e, e.valueSpace * 1.2);
83 e.addText(e, ZCTX(_("Disabled")), 0);
84 e.addRange(e, 0.05, 0.5, 0.05);
85 e.configureXonoticMixedSliderValues(e);
86 me.TR(me);
87 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "r_textshadow", _("Text shadow"),
88 _("Draw a shadow behind all text to improve readability")));
89 e.applyButton = miscApplyButton;
90 me.TR(me);
91 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showtime", _("Show current date and time"),
92 _("Show current date and time of day, useful on screenshots")));
93 makeMulti(e, "showdate");
94 me.TR(me);
95 me.TR(me);
96 me.TDempty(me, 0.5);
97 me.TD(me, 1, 2, e = makeXonoticButton_T(_("Advanced settings..."), '0 0 0',
98 _("Advanced settings where you can tweak every single variable of the game")));
99 e.onClick = DialogOpenButton_Click;
100 e.onClickEntity = main.cvarsDialog;
101 me.TR(me);
102 me.TR(me);
103 me.TDempty(me, 0.5);
104 me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '1 0 0'));
105 e.onClick = DialogOpenButton_Click;
106 e.onClickEntity = main.resetDialog;
107
108 me.gotoRC(me, me.rows - 1, 0);
109 me.TD(me, 1, me.columns, miscApplyButton);
110}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
#define COMMANDBUTTON_APPLY
float CVAR_TYPEFLAG_ENGINE
#define ADDVALUE_SPEED_KB(i)
entity makeXonoticMiscSettingsTab()
#define ADDVALUE_SPEED_MB(i, j)
void XonoticMiscSettingsTab_fill(entity me)
#define ZCTX(s)
Definition i18n.qh:68
#define main
Definition _all.inc:202
entity makeXonoticButton_T(string theText, vector theColor, string theTooltip)
Definition button.qc:3
entity makeXonoticButton(string theText, vector theColor)
Definition button.qc:10
void makeMulti(entity e, string otherCvars)
Definition util.qc:92
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:180
string strzone(string s)
void DialogOpenButton_Click(entity button, entity tab)
#define NEW(cname,...)
Definition oo.qh:117
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticHeaderLabel(string theText)
Definition textlabel.qc:10
entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
Definition checkbox.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
Definition checkbox.qc:40
entity makeXonoticMixedSlider(string theCvar)
entity makeXonoticMixedSlider_T(string theCvar, string theTooltip)
Definition mixedslider.qc:3
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
Definition slider.qc:3