]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_notification.qc
Header police
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_notification.qc
1 #include "dialog_hudpanel_notification.qh"
2 #ifndef DIALOG_HUDPANEL_NOTIFICATION_H
3 #define DIALOG_HUDPANEL_NOTIFICATION_H
4 #include "rootdialog.qc"
5 CLASS(XonoticHUDNotificationDialog, XonoticRootDialog)
6         METHOD(XonoticHUDNotificationDialog, fill, void(entity));
7         ATTRIB(XonoticHUDNotificationDialog, title, string, _("Notification Panel"))
8         ATTRIB(XonoticHUDNotificationDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
9         ATTRIB(XonoticHUDNotificationDialog, intendedWidth, float, 0.4)
10         ATTRIB(XonoticHUDNotificationDialog, rows, float, 15)
11         ATTRIB(XonoticHUDNotificationDialog, columns, float, 4)
12         ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify")
13         ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, true)
14 ENDCLASS(XonoticHUDNotificationDialog)
15 #endif
16
17 #ifdef IMPLEMENTATION
18 void XonoticHUDNotificationDialog_fill(entity me)
19 {
20         entity e;
21         string panelname = "notify";
22
23         DIALOG_HUDPANEL_COMMON();
24
25         me.TR(me);
26                 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Notifications:")));
27         me.TR(me);
28                 me.TDempty(me, 0.2);
29                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_print", _("Also print notifications to the console")));
30         me.TR(me);
31                 me.TDempty(me, 0.2);
32                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", _("Flip notify order")));
33         me.TR(me);
34                 me.TDempty(me, 0.2);
35                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry lifetime:")));
36                         me.TD(me, 1, 2.6, e = makeXonoticSlider(3, 15, 1, "hud_panel_notify_time"));
37         me.TR(me);
38                 me.TDempty(me, 0.2);
39                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry fadetime:")));
40                         me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_notify_fadetime"));
41 }
42 #endif