Xonotic
dialog_hudpanel_physics.qc File Reference
#include "dialog_hudpanel_physics.qh"
#include "textlabel.qh"
#include "textslider.qh"
#include "checkbox.qh"
#include "slider.qh"
+ Include dependency graph for dialog_hudpanel_physics.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XonoticHUDPhysicsDialog_fill (entity me)
 

Function Documentation

◆ XonoticHUDPhysicsDialog_fill()

void XonoticHUDPhysicsDialog_fill ( entity  me)

Definition at line 8 of file dialog_hudpanel_physics.qc.

References entity(), and makeXonoticTextSlider().

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 }
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition: slider.qc:10
entity makeXonoticTextSlider(string theCvar)
Definition: textslider.qc:10
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28
+ Here is the call graph for this function: