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