Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_touchexplode.qc
Go to the documentation of this file.
1
#include "
ui_touchexplode.qh
"
2
3
#include <
menu/xonotic/slider.qh
>
4
5
entity
makeXonoticMutatorTouchExplodeTab
()
6
{
7
entity
me =
NEW
(
XonoticMutatorTouchExplodeTab
);
8
me.configureDialog(me);
9
return
me;
10
}
11
12
void
XonoticMutatorTouchExplodeTab_fill
(
entity
me)
13
{
14
entity
e;
15
16
Mutators_main_checkbox
(me);
17
18
me.TR(me);
19
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Damage:"
)));
20
me.TD(me, 1, 2.5, e =
makeXonoticSlider
(0, 100, 5,
"g_touchexplode_damage"
));
21
me.TR(me);
22
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Force:"
)));
23
me.TD(me, 1, 2.5, e =
makeXonoticSlider
(0, 1000, 50,
"g_touchexplode_force"
));
24
e.formatString = _(
"%s qu/s"
);
25
}
26
27
METHOD
(
XonoticMutatorTouchExplodeTab
, describe,
string
(
XonoticMutatorTouchExplodeTab
me))
28
{
29
return
_(
"An explosion occurs when two players collide."
);
30
}
31
METHOD
(
XonoticMutatorTouchExplodeTab
,
canEnable
,
bool
(
XonoticMutatorTouchExplodeTab
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
XonoticMutatorTouchExplodeTab
Definition
ui_touchexplode.qh:4
XonoticMutatorTouchExplodeTab::message
string message
Definition
ui_touchexplode.qh:7
XonoticMutatorTouchExplodeTab::canEnable
virtual void canEnable()
Definition
ui_touchexplode.qc:31
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
makeXonoticMutatorTouchExplodeTab
entity makeXonoticMutatorTouchExplodeTab()
Definition
ui_touchexplode.qc:5
XonoticMutatorTouchExplodeTab_fill
void XonoticMutatorTouchExplodeTab_fill(entity me)
Definition
ui_touchexplode.qc:12
ui_touchexplode.qh
makeXonoticSlider
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition
slider.qc:9
slider.qh
common
mutators
mutator
touchexplode
ui_touchexplode.qc
Generated on
for Xonotic QuakeC by
1.16.1