Xonotic
dialog_hudpanel_physics.qc
Go to the documentation of this file.
1
#include "
dialog_hudpanel_physics.qh
"
2
3
#include "
textlabel.qh
"
4
#include "
textslider.qh
"
5
#include "
checkbox.qh
"
6
#include "
slider.qh
"
7
8
void
XonoticHUDPhysicsDialog_fill
(
entity
me)
9
{
10
entity
e;
11
string
panelname =
"physics"
;
12
13
me.TR(me);
14
me.TD(me, 1, 4, e =
makeXonoticTextSlider
(
"hud_panel_physics"
));
15
e.addValue(e, _(
"Disable"
),
"0"
);
16
e.addValue(e, _(
"Enable"
),
"1"
);
17
e.addValue(e, _(
"Enable even observing"
),
"2"
);
18
e.addValue(e, _(
"Enable only in Race/CTS"
),
"3"
);
19
e.configureXonoticTextSliderValues(e);
20
21
dialog_hudpanel_main_settings
(me, panelname);
22
23
me.TR(me);
24
me.TD(me, 1, 1.4, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_progressbar"
, _(
"Status bar"
)));
25
me.TD(me, 1, 2.6, e =
makeXonoticTextSlider
(
"hud_panel_physics_baralign"
));
26
e.addValue(e, _(
"Left align"
) ,
"0"
);
27
e.addValue(e, _(
"Right align"
) ,
"1"
);
28
e.addValue(e, _(
"Inward align"
) ,
"2"
);
29
e.addValue(e, _(
"Outward align"
),
"3"
);
30
e.configureXonoticTextSliderValues(e);
31
setDependent
(e,
"hud_panel_physics_progressbar"
, 1, 3);
32
me.TR(me);
33
me.TD(me, 1, 4, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_flip"
, _(
"Flip speed/acceleration positions"
)));
34
35
//speed
36
me.TR(me);
37
me.TD(me, 1, 1, e =
makeXonoticTextLabel
(0, _(
"Speed:"
)));
38
me.TD(me, 1, 3, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_speed_vertical"
, _(
"Include vertical speed"
)));
39
// me.TR(me);
40
// me.TDempty(me, 0.2);
41
// me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
42
// setDependent(e, "hud_panel_physics_progressbar", 1, 1);
43
// me.TD(me, 1, 1, e = makeXonoticInputBox(1, "hud_panel_physics_speed_max"));
44
// setDependent(e, "hud_panel_physics_progressbar", 1, 1);
45
// me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("qu/s")));
46
// setDependent(e, "hud_panel_physics_progressbar", 1, 1);
47
me.TR(me);
48
me.TDempty(me, 0.2);
49
me.TD(me, 1, 1.2, e =
makeXonoticTextLabel
(0, _(
"Speed unit:"
)));
50
me.TD(me, 1, 2.6/3*2, e =
makeXonoticTextSlider
(
"hud_panel_physics_speed_unit"
));
51
e.addValue(e, _(
"qu/s"
) ,
"1"
);
52
e.addValue(e, _(
"m/s"
) ,
"2"
);
53
e.addValue(e, _(
"km/h"
) ,
"3"
);
54
e.addValue(e, _(
"mph"
) ,
"4"
);
55
e.addValue(e, _(
"knots"
),
"5"
);
56
e.configureXonoticTextSliderValues(e);
57
me.TD(me, 1, 2.6/3, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_speed_unit_show"
, _(
"Show"
)));
58
me.TR(me);
59
me.TDempty(me, 0.2);
60
me.TD(me, 1, 3.8/2, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_topspeed"
, _(
"Top speed"
)));
61
me.TD(me, 1, 3.8/2, e =
makeXonoticSlider
(1, 10, 1,
"hud_panel_physics_topspeed_time"
));
62
setDependent
(e,
"hud_panel_physics_topspeed"
, 1, 1);
63
64
//acceleration
65
me.TR(me);
66
me.TD(me, 1, 1, e =
makeXonoticTextLabel
(0, _(
"Acceleration:"
)));
67
me.TD(me, 1, 3, e =
makeXonoticCheckBox
(0,
"hud_panel_physics_acceleration_vertical"
, _(
"Include vertical acceleration"
)));
68
// me.TR(me);
69
// me.TDempty(me, 0.2);
70
// me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
71
// setDependent(e, "hud_panel_physics_progressbar", 1, 1);
72
// me.TD(me, 1, 0.6, e = makeXonoticInputBox(1, "hud_panel_physics_acceleration_max"));
73
// setDependent(e, "hud_panel_physics_progressbar", 1, 1);
74
}
XonoticHUDPhysicsDialog_fill
void XonoticHUDPhysicsDialog_fill(entity me)
Definition:
dialog_hudpanel_physics.qc:8
entity
entity() spawn
dialog_hudpanel_main_settings
void dialog_hudpanel_main_settings(entity me, string panelname)
Definition:
util.qc:773
makeXonoticTextLabel
entity makeXonoticTextLabel(float theAlign, string theText)
Definition:
textlabel.qc:3
makeXonoticSlider
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition:
slider.qc:10
dialog_hudpanel_physics.qh
checkbox.qh
slider.qh
textlabel.qh
textslider.qh
makeXonoticTextSlider
entity makeXonoticTextSlider(string theCvar)
Definition:
textslider.qc:10
makeXonoticCheckBox
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition:
checkbox.qc:28
setDependent
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition:
util.qc:178
menu
xonotic
dialog_hudpanel_physics.qc
Generated on Thu Mar 17 2022 17:26:29 for Xonotic by
1.8.13