1 #include "dialog_hudpanel_physics.qh"
2 #ifndef DIALOG_HUDPANEL_PHYSICS_H
3 #define DIALOG_HUDPANEL_PHYSICS_H
4 #include "rootdialog.qc"
5 CLASS(XonoticHUDPhysicsDialog, XonoticRootDialog)
6 METHOD(XonoticHUDPhysicsDialog, fill, void(entity));
7 ATTRIB(XonoticHUDPhysicsDialog, title, string, _("Physics Panel"))
8 ATTRIB(XonoticHUDPhysicsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
9 ATTRIB(XonoticHUDPhysicsDialog, intendedWidth, float, 0.4)
10 ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15)
11 ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4)
12 ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics")
13 ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity, NULL)
14 ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, true)
15 ENDCLASS(XonoticHUDPhysicsDialog)
19 void XonoticHUDPhysicsDialog_fill(entity me)
22 string panelname = "physics";
25 me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_physics"));
26 e.addValue(e, _("Panel disabled"), "0");
27 e.addValue(e, _("Panel enabled"), "1");
28 e.addValue(e, _("Panel enabled even observing"), "2");
29 e.addValue(e, _("Panel enabled only in Race/CTS"), "3");
30 e.configureXonoticTextSliderValues(e);
32 DIALOG_HUDPANEL_COMMON_NOTOGGLE();
35 me.TD(me, 1, 1.4, e = makeXonoticCheckBox(0, "hud_panel_physics_progressbar", _("Status bar")));
36 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_physics_baralign"));
37 e.addValue(e, _("Left align") , "0");
38 e.addValue(e, _("Right align") , "1");
39 e.addValue(e, _("Inward align") , "2");
40 e.addValue(e, _("Outward align"), "3");
41 e.configureXonoticTextSliderValues(e);
42 setDependent(e, "hud_panel_physics_progressbar", 1, 3);
44 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_physics_flip", _("Flip speed/acceleration positions")));
48 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Speed:")));
49 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_vertical", _("Include vertical speed")));
51 // me.TDempty(me, 0.2);
52 // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
53 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
54 // me.TD(me, 1, 1, e = makeXonoticInputBox(1, "hud_panel_physics_speed_max"));
55 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
56 // me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("qu/s")));
57 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
60 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Speed unit:")));
61 me.TD(me, 1, 2.6/3*2, e = makeXonoticTextSlider("hud_panel_physics_speed_unit"));
62 e.addValue(e, _("qu/s") , "1");
63 e.addValue(e, _("m/s") , "2");
64 e.addValue(e, _("km/h") , "3");
65 e.addValue(e, _("mph") , "4");
66 e.addValue(e, _("knots"), "5");
67 e.configureXonoticTextSliderValues(e);
68 me.TD(me, 1, 2.6/3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_unit_show", _("Show")));
71 me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_physics_topspeed", _("Top speed")));
72 me.TD(me, 1, 3.8/2, e = makeXonoticSlider(1, 10, 1, "hud_panel_physics_topspeed_time"));
73 setDependent(e, "hud_panel_physics_topspeed", 1, 1);
77 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Acceleration:")));
78 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_acceleration_vertical", _("Include vertical acceleration")));
80 // me.TDempty(me, 0.2);
81 // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Full status bar at:")));
82 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
83 // me.TD(me, 1, 0.6, e = makeXonoticInputBox(1, "hud_panel_physics_acceleration_max"));
84 // setDependent(e, "hud_panel_physics_progressbar", 1, 1);