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