]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_hudpanel_physics.qc
Merge branch 'master' into Mario/waterjump_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_physics.qc
index 6e4917d93c0f8bb75be6906680c94c54d2faae28..3a1e0bee1822a42e2fd363323e8f41cec73296f4 100644 (file)
@@ -1,18 +1,10 @@
-#ifdef INTERFACE
-CLASS(XonoticHUDPhysicsDialog) EXTENDS(XonoticRootDialog)
-       METHOD(XonoticHUDPhysicsDialog, fill, void(entity))
-       ATTRIB(XonoticHUDPhysicsDialog, title, string, _("Physics Panel"))
-       ATTRIB(XonoticHUDPhysicsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
-       ATTRIB(XonoticHUDPhysicsDialog, intendedWidth, float, 0.4)
-       ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15)
-       ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4)
-       ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics")
-       ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity, NULL)
-       ATTRIB(XonoticHUDPhysicsDialog, requiresConnection, float, true)
-ENDCLASS(XonoticHUDPhysicsDialog)
-#endif
+#include "dialog_hudpanel_physics.qh"
+
+#include "textlabel.qh"
+#include "textslider.qh"
+#include "checkbox.qh"
+#include "slider.qh"
 
-#ifdef IMPLEMENTATION
 void XonoticHUDPhysicsDialog_fill(entity me)
 {
        entity e;
@@ -20,13 +12,13 @@ void XonoticHUDPhysicsDialog_fill(entity me)
 
        me.TR(me);
                me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_physics"));
-                       e.addValue(e, _("Panel disabled"), "0");
-                       e.addValue(e, _("Panel enabled"), "1");
-                       e.addValue(e, _("Panel enabled even observing"), "2");
-                       e.addValue(e, _("Panel enabled only in Race/CTS"), "3");
+                       e.addValue(e, _("Disable"), "0");
+                       e.addValue(e, _("Enable"), "1");
+                       e.addValue(e, _("Enable even observing"), "2");
+                       e.addValue(e, _("Enable only in Race/CTS"), "3");
                        e.configureXonoticTextSliderValues(e);
 
-       DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+       dialog_hudpanel_main_settings(me, panelname);
 
        me.TR(me);
                me.TD(me, 1, 1.4, e = makeXonoticCheckBox(0, "hud_panel_physics_progressbar", _("Status bar")));
@@ -80,4 +72,3 @@ void XonoticHUDPhysicsDialog_fill(entity me)
                // me.TD(me, 1, 0.6, e = makeXonoticInputBox(1, "hud_panel_physics_acceleration_max"));
                        // setDependent(e, "hud_panel_physics_progressbar", 1, 1);
 }
-#endif