Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_hudpanel_physics.qc File Reference
#include "dialog_hudpanel_physics.qh"
#include "textlabel.qh"
#include "mixedslider.qh"
#include "checkbox.qh"
#include "slider.qh"
#include "radiobutton.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 9 of file dialog_hudpanel_physics.qc.

10{
11 entity e;
12 string panelname = "physics";
13
14 me.TR(me);
15 me.TD(me, 1, 4, e = makeXonoticMixedSlider("hud_panel_physics"));
16 e.setValueSpace(e, e.valueSpace * 1.2);
17 e.addText(e, _("Disable"), 0);
18 e.addText(e, _("Enable"), 1);
19 e.addText(e, _("Enable even observing"), 2);
20 e.addText(e, _("Enable only in Race/CTS"), 3);
21 e.configureXonoticMixedSliderValues(e);
22
23 dialog_hudpanel_main_settings(me, panelname);
24
25 me.TR(me);
26 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_physics_flip", _("Flip speed/acceleration positions")));
27 me.TR(me);
28 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Status bar")));
29 me.TD(me, 1, 2.6, e = makeXonoticMixedSlider("hud_panel_physics_progressbar"));
30 e.addText(e, _("None"), 0);
31 e.addText(e, _("Speed"), 2);
32 e.addText(e, _("Acceleration"), 3);
33 e.addText(e, _("Both"), 1);
34 e.configureXonoticMixedSliderValues(e);
35 me.TR(me);
36 me.TDempty(me, 0.2);
37 me.TD(me, 1, 3.8, e = makeXonoticTextLabel(0, _("Status bar alignment:")));
38 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
39 me.TR(me);
40 me.TDempty(me, 0.4);
41 me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "0", _("Left")));
42 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
43 me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "1", _("Right")));
44 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
45 me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "2", _("Inward")));
46 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
47 me.TD(me, 1, 3.6/4, e = makeXonoticRadioButton(2, "hud_panel_physics_baralign", "3", _("Outward")));
48 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
49
50//speed
51 me.TR(me);
52 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Speed:")));
53 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_vertical", _("Include vertical speed")));
54 // me.TR(me);
55 // me.TDempty(me, 0.2);
56 // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
57 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
58 // me.TD(me, 1, 1, e = makeXonoticInputBox(1, "hud_panel_physics_speed_max"));
59 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
60 // me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("qu/s")));
61 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
62 me.TR(me);
63 me.TDempty(me, 0.2);
64 me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_physics_topspeed", _("Top speed")));
65 me.TD(me, 1, 3.8/2, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_physics_topspeed_time"));
66 e.formatString = "S";
67 e.setValueSpace(e, e.valueSpace * 1.5);
68 setDependent(e, "hud_panel_physics_topspeed", 1, 1);
69 me.TR(me);
70 me.TDempty(me, 0.2);
71 me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_physics_jumpspeed", _("Jump speed")));
72 me.TD(me, 1, 3.8/2, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_physics_jumpspeed_time"));
73 e.formatString = "S";
74 e.setValueSpace(e, e.valueSpace * 1.5);
75 setDependent(e, "hud_panel_physics_jumpspeed", 1, 1);
76 me.TR(me);
77 me.TDempty(me, 0.2);
78 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_unit_show", _("Show speed unit")));
79 setDependent(e, "hud_panel_physics_topspeed", 0, 0);
80 setDependentOR(e, "hud_panel_physics_jumpspeed", 0, 0);
81
82//acceleration
83 me.TR(me);
84 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Acceleration:")));
85 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_acceleration_vertical", _("Include vertical acceleration")));
86 // me.TR(me);
87 // me.TDempty(me, 0.2);
88 // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
89 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
90 // me.TD(me, 1, 0.6, e = makeXonoticInputBox(1, "hud_panel_physics_acceleration_max"));
91 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
92}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:231
void dialog_hudpanel_main_settings(entity me, string panelname)
Definition util.qc:731
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:180
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticMixedSlider(string theCvar)
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition slider.qc:10

References dialog_hudpanel_main_settings(), entity(), makeXonoticCheckBox(), makeXonoticMixedSlider(), makeXonoticRadioButton(), makeXonoticSlider(), makeXonoticTextLabel(), setDependent(), and setDependentOR().