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