]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc
Put GameLogInit() code in there instead of in spawnfunc(worldspawn)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_weapons.qc
index a5fedbd3fd4915c2bd683b5d65f141da990b7839..116b8ae2f06798a47e1854b5306c6eb58130acf9 100644 (file)
@@ -1,26 +1,21 @@
-#ifndef DIALOG_HUDPANEL_WEAPONS_H
-#define DIALOG_HUDPANEL_WEAPONS_H
-#include "rootdialog.qc"
-CLASS(XonoticHUDWeaponsDialog, XonoticRootDialog)
-       METHOD(XonoticHUDWeaponsDialog, fill, void(entity));
-       ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel"))
-       ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
-       ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4)
-       ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21)
-       ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4)
-       ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons")
-       ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, true)
-ENDCLASS(XonoticHUDWeaponsDialog)
-#endif
+#include "dialog_hudpanel_weapons.qh"
+
+#include "checkbox.qh"
+#include "textlabel.qh"
+#include "textslider.qh"
+#include "slider.qh"
+#include "radiobutton.qh"
+#include "colorpicker_string.qh"
 
-#ifdef IMPLEMENTATION
 void XonoticHUDWeaponsDialog_fill(entity me)
 {
        entity e;
        string panelname = "weapons";
        float i;
 
-       DIALOG_HUDPANEL_COMMON();
+       dialog_hudpanel_main_checkbox(me, panelname);
+
+       dialog_hudpanel_main_settings(me, panelname);
 
        me.TR(me);
                me.TDempty(me, 0.2);
@@ -63,6 +58,7 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Weapon ID scale:")));
+                       setDependent(e, "hud_panel_weapons_label", 1, 2);
                        me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.05, "hud_panel_weapons_label_scale"));
                        setDependent(e, "hud_panel_weapons_label", 1, 2);
        me.TR(me);
@@ -72,13 +68,14 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
+                       setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                        me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
                        setDependent(e, "hud_panel_weapons_ammo", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
+                       setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
                        setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                me.TR(me);
 }
-#endif