1 #ifndef DIALOG_HUDPANEL_AMMO_H
2 #define DIALOG_HUDPANEL_AMMO_H
3 #include "rootdialog.qc"
4 CLASS(XonoticHUDAmmoDialog, XonoticRootDialog)
5 METHOD(XonoticHUDAmmoDialog, fill, void(entity));
6 ATTRIB(XonoticHUDAmmoDialog, title, string, _("Ammo Panel"))
7 ATTRIB(XonoticHUDAmmoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
8 ATTRIB(XonoticHUDAmmoDialog, intendedWidth, float, 0.4)
9 ATTRIB(XonoticHUDAmmoDialog, rows, float, 15)
10 ATTRIB(XonoticHUDAmmoDialog, columns, float, 4)
11 ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo")
12 ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, true)
13 ENDCLASS(XonoticHUDAmmoDialog)
17 void XonoticHUDAmmoDialog_fill(entity me)
20 string panelname = "ammo";
22 DIALOG_HUDPANEL_COMMON();
25 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:")));
28 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type")));
31 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent alpha:")));
32 me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_ammo_noncurrent_alpha"));
35 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent scale:")));
36 me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_ammo_noncurrent_scale"));
39 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Align icon:")));
40 me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", _("Left")));
41 me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", _("Right")));