Xonotic
ui_damagetext.qc
Go to the documentation of this file.
1 #include "ui_damagetext.qh"
2 
3 #include <menu/gamesettings.qh>
4 #include <menu/xonotic/tab.qh>
5 
8  ATTRIB(XonoticDamageTextSettings, title, string, _("Damage text"));
9  ATTRIB(XonoticDamageTextSettings, intendedWidth, float, 0.9);
10  ATTRIB(XonoticDamageTextSettings, rows, float, 15.5);
11  ATTRIB(XonoticDamageTextSettings, columns, float, 5);
12  INIT(XonoticDamageTextSettings) { this.configureDialog(this); }
13  METHOD(XonoticDamageTextSettings, showNotify, void(entity this)) { loadAllCvars(this); }
15  {
16  entity e;
17  this.gotoRC(this, 0, 1); this.setFirstColumn(this, this.currentColumn);
18  this.TD(this, 1, 3, makeXonoticCheckBox(0, "cl_damagetext", _("Draw damage numbers")));
19  this.TR(this);
20  this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Font size minimum:")));
21  setDependent(e, "cl_damagetext", 1, 1);
22  this.TD(this, 1, 2, e = makeXonoticSlider(0, 50, 1, "cl_damagetext_size_min"));
23  setDependent(e, "cl_damagetext", 1, 1);
24  this.TR(this);
25  this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Font size maximum:")));
26  setDependent(e, "cl_damagetext", 1, 1);
27  this.TD(this, 1, 2, e = makeXonoticSlider(0, 50, 1, "cl_damagetext_size_max"));
28  setDependent(e, "cl_damagetext", 1, 1);
29  this.TR(this);
30  this.TD(this, 1, 1, e = makeXonoticTextLabel(0, _("Color:")));
31  setDependent(e, "cl_damagetext", 1, 1);
32  this.TD(this, 2, 2, e = makeXonoticColorpickerString("cl_damagetext_color", "cl_damagetext_color"));
33  setDependent(e, "cl_damagetext", 1, 1);
34  this.TR(this);
35  this.TR(this);
36  this.TD(this, 1, 3, e = makeXonoticCheckBox(0, "cl_damagetext_friendlyfire", _("Draw damage numbers for friendly fire")));
37  setDependent(e, "cl_damagetext", 1, 1);
38  }
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
Definition: tab.qh:4
REGISTER_SETTINGS(Crosshair, makeXonoticGameCrosshairSettingsTab())
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition: slider.qc:10
#define ATTRIB(...)
Definition: oo.qh:136
#define INIT(cname)
Definition: oo.qh:198
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
#define ENDCLASS(cname)
Definition: oo.qh:269
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28