]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc
Merge remote-tracking branch 'origin/master' into terencehill/listbox_item_highlight
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_ammo.qc
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)
14 #endif
15
16 #ifdef IMPLEMENTATION
17 void XonoticHUDAmmoDialog_fill(entity me)
18 {
19         entity e;
20         string panelname = "ammo";
21
22         DIALOG_HUDPANEL_COMMON();
23
24         me.TR(me);
25                 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:")));
26         me.TR(me);
27                 me.TDempty(me, 0.2);
28                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type")));
29         me.TR(me);
30                 me.TDempty(me, 0.2);
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"));
33         me.TR(me);
34                 me.TDempty(me, 0.2);
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"));
37         me.TR(me);
38                 me.TDempty(me, 0.2);
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")));
42 }
43 #endif