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