Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_midair.qc
Go to the documentation of this file.
1
#include "
ui_midair.qh
"
2
3
#include <
menu/xonotic/slider.qh
>
4
#include <
menu/xonotic/textlabel.qh
>
5
6
entity
makeXonoticMutatorMidAirTab
()
7
{
8
entity
me =
NEW
(
XonoticMutatorMidAirTab
);
9
me.configureDialog(me);
10
return
me;
11
}
12
13
void
XonoticMutatorMidAirTab_fill
(
entity
me)
14
{
15
entity
e;
16
17
Mutators_main_checkbox
(me);
18
19
me.TR(me);
20
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Invincibility time:"
)));
21
me.TD(me, 1, 2.5, e =
makeXonoticSlider_T
(0, 1, 0.1,
"g_midair_shieldtime"
,
22
_(
"Invincibility time after leaving contact with ground"
)));
23
e.formatString =
"S"
;
24
e.setValueSpace(e, e.valueSpace * 1.2);
25
}
26
27
METHOD
(
XonoticMutatorMidAirTab
, describe,
string
(
XonoticMutatorMidAirTab
me))
28
{
29
return
_(
"Makes it only possible to inflict damage on your enemy while they're airborne."
);
30
}
31
METHOD
(
XonoticMutatorMidAirTab
,
canEnable
,
bool
(
XonoticMutatorMidAirTab
me,
bool
is_already_enabled))
32
{
33
bool
can_enable =
true
;
34
if
(is_already_enabled)
35
return
can_enable &&
cvar
(me.
message
);
36
return
can_enable;
37
}
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
XonoticMutatorMidAirTab
Definition
ui_midair.qh:4
XonoticMutatorMidAirTab::canEnable
virtual void canEnable()
Definition
ui_midair.qc:31
XonoticMutatorMidAirTab::message
string message
Definition
ui_midair.qh:7
cvar
float cvar(string name)
Mutators_main_checkbox
entity Mutators_main_checkbox(entity me)
Definition
mutatortab.qc:25
NEW
#define NEW(cname,...)
Definition
oo.qh:120
METHOD
#define METHOD(cname, name, prototype)
Definition
oo.qh:274
makeXonoticTextLabel
entity makeXonoticTextLabel(float theAlign, string theText)
Definition
textlabel.qc:3
textlabel.qh
XonoticMutatorMidAirTab_fill
void XonoticMutatorMidAirTab_fill(entity me)
Definition
ui_midair.qc:13
makeXonoticMutatorMidAirTab
entity makeXonoticMutatorMidAirTab()
Definition
ui_midair.qc:6
ui_midair.qh
makeXonoticSlider_T
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
Definition
slider.qc:3
slider.qh
common
mutators
mutator
midair
ui_midair.qc
Generated on
for Xonotic QuakeC by
1.16.1