]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc
Fix #2182 "Untranslatable strings in hudpanel_pressedkeys"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_pressedkeys.qc
index 79f581d13456f2f5bb93fd34ca5d324137375254..62b29e8c92774309576ddce2b6cd947f6a911f1f 100644 (file)
@@ -1,17 +1,9 @@
-#ifdef INTERFACE
-CLASS(XonoticHUDPressedKeysDialog) EXTENDS(XonoticRootDialog)
-       METHOD(XonoticHUDPressedKeysDialog, fill, void(entity))
-       ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel"))
-       ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
-       ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4)
-       ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
-       ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4)
-       ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys")
-       ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, true)
-ENDCLASS(XonoticHUDPressedKeysDialog)
-#endif
+#include "dialog_hudpanel_pressedkeys.qh"
+
+#include "textslider.qh"
+#include "slider.qh"
+#include "textlabel.qh"
 
-#ifdef IMPLEMENTATION
 void XonoticHUDPressedKeysDialog_fill(entity me)
 {
        entity e;
@@ -19,16 +11,15 @@ void XonoticHUDPressedKeysDialog_fill(entity me)
 
        me.TR(me);
                me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
-                       e.addValue(e, _("Panel disabled"), "0");
-                       e.addValue(e, _("Panel enabled when spectating"), "1");
-                       e.addValue(e, _("Panel always enabled"), "2");
+                       e.addValue(e, (_("Disable")), "0");
+                       e.addValue(e, (_("Enable spectating")), "1");
+                       e.addValue(e, (_("Always enable")), "2");
                        e.configureXonoticTextSliderValues(e);
 
-       DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+       dialog_hudpanel_main_settings(me, panelname);
 
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Forced aspect:")));
                        me.TD(me, 1, 2.6, e = makeXonoticSlider(0.2, 4, 0.1, "hud_panel_pressedkeys_aspect"));
 }
-#endif