Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_settings_misc.qc File Reference
#include "dialog_settings_misc.qh"
#include "textlabel.qh"
#include "inputbox.qh"
#include "mixedslider.qh"
#include "slider.qh"
#include "checkbox.qh"
#include "button.qh"
#include "mainwindow.qh"
#include "commandbutton.qh"
Include dependency graph for dialog_settings_misc.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ADDVALUE_SPEED_KB(i)
#define ADDVALUE_SPEED_MB(i, j)

Functions

entity makeXonoticMiscSettingsTab ()
void XonoticMiscSettingsTab_fill (entity me)

Macro Definition Documentation

◆ ADDVALUE_SPEED_KB

#define ADDVALUE_SPEED_KB ( i)
Value:
e.addText(e, strzone(sprintf(_("%d KiB/s"), i)), i)
string strzone(string s)

Referenced by XonoticMiscSettingsTab_fill().

◆ ADDVALUE_SPEED_MB

#define ADDVALUE_SPEED_MB ( i,
j )
Value:
e.addText(e, strzone(sprintf(_("%d MiB/s"), i)), j)

Referenced by XonoticMiscSettingsTab_fill().

Function Documentation

◆ makeXonoticMiscSettingsTab()

entity makeXonoticMiscSettingsTab ( )

Definition at line 12 of file dialog_settings_misc.qc.

13{
15 me.configureDialog(me);
16 return me;
17}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), and NEW.

Referenced by XonoticSettingsDialog_fill().

◆ XonoticMiscSettingsTab_fill()

void XonoticMiscSettingsTab_fill ( entity me)

Definition at line 18 of file dialog_settings_misc.qc.

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

References ADDVALUE_SPEED_KB, ADDVALUE_SPEED_MB, COMMANDBUTTON_APPLY, CVAR_TYPEFLAG_ENGINE, DialogOpenButton_Click(), entity(), main, makeMulti(), makeXonoticButton(), makeXonoticButton_T(), makeXonoticCheckBox(), makeXonoticCheckBox_T(), makeXonoticCheckBoxEx(), makeXonoticCommandButton(), makeXonoticHeaderLabel(), makeXonoticMixedSlider(), makeXonoticMixedSlider_T(), makeXonoticSlider_T(), makeXonoticTextLabel(), setDependent(), strzone(), and ZCTX.