Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ui_bloodloss.qc
Go to the documentation of this file.
1
#include "
ui_bloodloss.qh
"
2
3
#include <
menu/xonotic/checkbox_slider_invalid.qh
>
4
#include <
menu/xonotic/slider.qh
>
5
#include <
menu/xonotic/textlabel.qh
>
6
7
entity
makeXonoticMutatorBloodLossTab
()
8
{
9
entity
me =
NEW
(
XonoticMutatorBloodLossTab
);
10
me.configureDialog(me);
11
return
me;
12
}
13
14
void
XonoticMutatorBloodLossTab_fill
(
entity
me)
15
{
16
entity
e;
17
entity
s =
makeXonoticSlider
(10, 50, 1, me.message);
18
19
me.TR(me);
20
me.TDempty(me, 1.75);
21
me.TD(me, 1, 2.25, e =
makeXonoticSliderCheckBox
(0, 1, s, _(
"Enable"
)));
22
Mutators_add_SliderCheckBox
(me, e);
23
me.TR(me);
24
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Bleed below health:"
)));
25
me.TD(me, 1, 2.5, s);
26
}
27
28
METHOD
(
XonoticMutatorBloodLossTab
, describe,
string
(
XonoticMutatorBloodLossTab
me))
29
{
30
return
_(
"Amount of health below which players start bleeding out (health rots and they can't jump)."
);
31
}
32
METHOD
(
XonoticMutatorBloodLossTab
,
canEnable
,
bool
(
XonoticMutatorBloodLossTab
me,
bool
is_already_enabled))
33
{
34
bool
can_enable =
true
;
35
if
(is_already_enabled)
36
return
can_enable &&
cvar
(me.
message
);
37
return
can_enable;
38
}
makeXonoticSliderCheckBox
entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText)
Definition
checkbox_slider_invalid.qc:5
checkbox_slider_invalid.qh
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
XonoticMutatorBloodLossTab
Definition
ui_bloodloss.qh:4
XonoticMutatorBloodLossTab::message
string message
Definition
ui_bloodloss.qh:7
XonoticMutatorBloodLossTab::canEnable
virtual void canEnable()
Definition
ui_bloodloss.qc:32
cvar
float cvar(string name)
Mutators_add_SliderCheckBox
void Mutators_add_SliderCheckBox(entity me, entity e)
Definition
mutatortab.qc:60
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
XonoticMutatorBloodLossTab_fill
void XonoticMutatorBloodLossTab_fill(entity me)
Definition
ui_bloodloss.qc:14
makeXonoticMutatorBloodLossTab
entity makeXonoticMutatorBloodLossTab()
Definition
ui_bloodloss.qc:7
ui_bloodloss.qh
makeXonoticSlider
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition
slider.qc:9
slider.qh
common
mutators
mutator
bloodloss
ui_bloodloss.qc
Generated on
for Xonotic QuakeC by
1.16.1