]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc
Merge branch 'master' into Mario/monsters_broken
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_centerprint.qc
1 #ifndef DIALOG_HUDPANEL_CENTERPRINT_H
2 #define DIALOG_HUDPANEL_CENTERPRINT_H
3 #include "rootdialog.qc"
4 CLASS(XonoticHUDCenterprintDialog, XonoticRootDialog)
5         METHOD(XonoticHUDCenterprintDialog, fill, void(entity));
6         ATTRIB(XonoticHUDCenterprintDialog, title, string, _("Centerprint Panel"))
7         ATTRIB(XonoticHUDCenterprintDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
8         ATTRIB(XonoticHUDCenterprintDialog, intendedWidth, float, 0.4)
9         ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15)
10         ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4)
11         ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint")
12         ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, true)
13 ENDCLASS(XonoticHUDCenterprintDialog)
14 #endif
15
16 #ifdef IMPLEMENTATION
17 void XonoticHUDCenterprintDialog_fill(entity me)
18 {
19         entity e;
20         string panelname = "centerprint";
21
22         DIALOG_HUDPANEL_COMMON();
23
24         me.TR(me);
25                 me.TDempty(me, 0.2);
26                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Message duration:")));
27                 me.TD(me, 1, 2.6, e = makeXonoticSlider(1, 10, 1, "hud_panel_centerprint_time"));
28         me.TR(me);
29                 me.TDempty(me, 0.2);
30                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade time:")));
31                 me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.05, "hud_panel_centerprint_fade_out"));
32         me.TR(me);
33                 me.TDempty(me, 0.2);
34                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_flip", _("Flip messages order")));
35         me.TR(me);
36                 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Text alignment:")));
37         me.TR(me);
38                 me.TDempty(me, 0.2);
39                         me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "0", _("Left")));
40                         me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "0.5", _("Center")));
41                         me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_centerprint_align", "1", _("Right")));
42         me.TR(me);
43                 me.TDempty(me, 0.2);
44                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Font scale:")));
45                 me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 2, 0.1, "hud_panel_centerprint_fontscale"));
46 }
47 #endif