]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc
Header police
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_itemstime.qc
1 #include "dialog_hudpanel_itemstime.qh"
2 #ifndef DIALOG_HUDPANEL_ITEMSTIME_H
3 #define DIALOG_HUDPANEL_ITEMSTIME_H
4 #include "rootdialog.qc"
5 CLASS(XonoticHUDItemsTimeDialog, XonoticRootDialog)
6         METHOD(XonoticHUDItemsTimeDialog, fill, void(entity));
7         ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel"))
8         ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
9         ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4)
10         ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15)
11         ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4)
12         ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime")
13 ENDCLASS(XonoticHUDItemsTimeDialog)
14 #endif
15
16 #ifdef IMPLEMENTATION
17 void XonoticHUDItemsTimeDialog_fill(entity me)
18 {
19         entity e;
20         string panelname = "itemstime";
21
22         me.TR(me);
23                 me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime"));
24                         e.addValue(e, ZCTX(_("PNL^Disabled")), "0");
25                         e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1");
26                         e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2");
27                         e.configureXonoticTextSliderValues(e);
28
29         DIALOG_HUDPANEL_COMMON_NOTOGGLE();
30
31         me.TR(me);
32                 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:")));
33                         me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "0", _("Left")));
34                         me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "1", _("Right")));
35         me.TR(me);
36                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar", _("Enable status bar")));
37                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar_reduced", _("Reduced")));
38                         setDependent(e, "hud_panel_itemstime_progressbar", 1, 1);
39         me.TR(me);
40                 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:")));
41                 me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio"));
42         me.TR(me);
43                 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_hidespawned", _("Hide spawned items")));
44         me.TR(me);
45                 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_hidelarge", _("Hide large armor and health")));
46         me.TR(me);
47                 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_dynamicsize", _("Dynamic size")));
48 }
49 #endif