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
6
CLASS
(
XonoticDamageTextSettings
,
XonoticTab
)
7
REGISTER_SETTINGS
(damagetext,
NEW
(
XonoticDamageTextSettings
));
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
); }
14
METHOD
(
XonoticDamageTextSettings
, fill,
void
(
entity
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
}
39
ENDCLASS
(
XonoticDamageTextSettings
)
ui_damagetext.qh
NEW
#define NEW(cname,...)
Definition:
oo.qh:105
CLASS
CLASS(Object) Object
Definition:
oo.qh:318
XonoticTab
Definition:
tab.qh:4
REGISTER_SETTINGS
REGISTER_SETTINGS(Crosshair, makeXonoticGameCrosshairSettingsTab())
entity
entity() spawn
makeXonoticTextLabel
entity makeXonoticTextLabel(float theAlign, string theText)
Definition:
textlabel.qc:3
METHOD
#define METHOD(cname, name, prototype)
Definition:
oo.qh:257
makeXonoticSlider
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition:
slider.qc:10
XonoticDamageTextSettings
Definition:
ui_damagetext.qc:6
ATTRIB
#define ATTRIB(...)
Definition:
oo.qh:136
INIT
#define INIT(cname)
Definition:
oo.qh:198
gamesettings.qh
loadAllCvars
void loadAllCvars(entity root)
Definition:
util.qc:51
makeXonoticColorpickerString
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
Definition:
colorpicker_string.qc:5
ENDCLASS
#define ENDCLASS(cname)
Definition:
oo.qh:269
makeXonoticCheckBox
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition:
checkbox.qc:28
tab.qh
setDependent
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition:
util.qc:178
common
mutators
mutator
damagetext
ui_damagetext.qc
Generated on Thu Mar 17 2022 17:26:28 for Xonotic by
1.8.13