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