]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_notification.c
almost finished the notifications dialog. fix: makeMulti()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_notification.c
1 #ifdef INTERFACE
2 CLASS(XonoticNotificationDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticNotificationDialog, toString, string(entity))
4         METHOD(XonoticNotificationDialog, fill, void(entity))
5         METHOD(XonoticNotificationDialog, showNotify, void(entity))
6         ATTRIB(XonoticNotificationDialog, title, string, _("Notification settings"))
7         ATTRIB(XonoticNotificationDialog, color, vector, SKINCOLOR_DIALOG_MODEL)
8         ATTRIB(XonoticNotificationDialog, intendedWidth, float, 0.6)
9         ATTRIB(XonoticNotificationDialog, rows, float, 19)
10         ATTRIB(XonoticNotificationDialog, columns, float, 3)
11 ENDCLASS(XonoticNotificationDialog)
12 #endif
13
14 #ifdef IMPLEMENTATION
15 void XonoticNotificationDialog_showNotify(entity me)
16 {
17         loadAllCvars(me);
18 }
19 string XonoticNotificationDialog_toString(entity me)
20 {
21         return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
22 }
23 void XonoticNotificationDialog_fill(entity me)
24 {
25         entity e;
26         
27         // General settings for the player
28         me.TR(me);
29                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("General Settings:")));
30
31         me.TR(me);
32                 me.TDempty(me, 0.1);
33                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_allow_chatboxprint", _("Print all notifications into the chatbox")));
34         me.TR(me);
35                 me.TDempty(me, 0.1);
36                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Notice connecting players:")));
37         me.TR(me);
38                 me.TDempty(me, 0.3);
39                 me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_INFO_QUIT_DISCONNECT"));
40                         //makeMulti(me, "notification_INFO_QUIT_KICK_IDLING notification_INFO_QUIT_KICK_SPECTATING notification_INFO_JOIN_PLAY notification_INFO_JOIN_CONNECT_TEAM_BLUE notification_INFO_JOIN_CONNECT_TEAM_PINK notification_INFO_JOIN_CONNECT_TEAM_RED notification_INFO_JOIN_CONNECT_TEAM_YELLOW");
41                         e.addValue(e, ZCTX(_("off")), "0");
42                         e.addValue(e, ZCTX(_("only console")), "1");
43                         e.addValue(e, ZCTX(_("console & chat")), "2");
44                         e.configureXonoticTextSliderValues(e);
45         me.TR(me);
46                 me.TDempty(me, 0.1);
47                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_ITEM_WEAPON_DONTHAVE", _("Item notifications")));
48         me.TR(me);
49                 me.TDempty(me, 0.1);
50                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications")));
51                         //makeMulti(e, "notification_CENTER_POWERUP_SHIELD notification_CENTER_POWERUP_SPEED notification_CENTER_POWERUP_STRENGTH notification_CENTER_POWERDOWN_INVISIBILITY notification_CENTER_POWERDOWN_SHIELD notification_CENTER_POWERDOWN_SPEED notification_CENTER_POWERDOWN_STRENGTH notification_CENTER_SUPERWEAPON_BROKEN notification_CENTER_SUPERWEAPON_LOST notification_CENTER_SUPERWEAPON_PICKUP");      
52         me.TR(me);
53                 me.TDempty(me, 0.1);
54                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_frag_verbose", _("Additional information on frags")));
55         me.TR(me);
56         me.TR(me);
57         
58         // Gamemode specific notifications
59                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Gamemode notifications:")));
60         me.TR(me);
61                 me.TDempty(me, 0.1);
62                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ARENA_BEGIN", _("Centerprint for gamemode notifications")));
63                         //makeMulti(me, "notification_CENTER_ARENA_NEEDPLAYER notification_CENTER_ARENA_ROUNDSTART notification_CENTER_ASSAULT_ATTACKING notification_CENTER_ASSAULT_DEFENDING notification_CENTER_CTF_PICKUP_BLUE notification_CENTER_CTF_PICKUP_ENEMY notification_CENTER_CTF_PICKUP_RED notification_CENTER_CTF_PICKUP_TEAM notification_CENTER_FREEZETAG_FREEZE notification_CENTER_FREEZETAG_FROZEN notification_CENTER_FREEZETAG_REVIVE notification_CENTER_FREEZETAG_REVIVED notification_CENTER_FREEZETAG_ROUND_WIN_BLUE notification_CENTER_FREEZETAG_ROUND_WIN_PINK notification_CENTER_FREEZETAG_ROUND_WIN_RED notification_CENTER_FREEZETAG_ROUND_WIN_YELLOW notification_CENTER_FREEZETAG_SELF notification_CENTER_FREEZETAG_SPAWN_LATE notification_CENTER_KEEPAWAY_DROPPED notification_CENTER_KEEPAWAY_PICKUP notification_CENTER_KEEPAWAY_WARN notification_CENTER_KEYHUNT_HELP notification_CENTER_KEYHUNT_INTERFERE_BLUE notification_CENTER_KEYHUNT_INTERFERE_PINK notification_CENTER_KEYHUNT_INTERFERE_RED notification_CENTER_KEYHUNT_INTERFERE_YELLOW notification_CENTER_KEYHUNT_MEET notification_CENTER_KEYHUNT_SCAN notification_CENTER_KEYHUNT_START_BLUE notification_CENTER_KEYHUNT_START_PINK notification_CENTER_KEYHUNT_START_RED notification_CENTER_KEYHUNT_START_YELLOW notification_CENTER_KEYHUNT_WAIT notification_CENTER_LMS_CAMPCHECK");
64         me.TR(me);
65                 me.TDempty(me, 0.1);
66                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_ctf_capture_verbose", _("Additional information on flag captures")));
67         me.TR(me);
68         
69         // Information on killingsprees
70         me.TR(me);
71                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Information on killingsprees:")));
72         me.TR(me);
73                 me.TDempty(me, 0.1);
74                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Print information on sprees")));
75         me.TR(me);
76                 me.TDempty(me, 0.1);
77                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Show spree information:")));
78         me.TR(me);
79                 me.TDempty(me, 0.3);
80                 me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_show_sprees_info"));
81                         e.addValue(e, ZCTX(_("off")), "0");
82                         e.addValue(e, ZCTX(_("target")), "1");
83                         e.addValue(e, ZCTX(_("attacker")), "2");
84                         e.addValue(e, ZCTX(_("target & attacker")), "3");
85                         e.configureXonoticTextSliderValues(e);
86         me.TR(me);
87                 me.TDempty(me, 0.1);
88                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print spree information in a new line")));
89                 
90         // Close this dialog
91         me.gotoRC(me, me.rows - 1, 0);
92                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
93                         e.onClick = Dialog_Close;
94                         e.onClickEntity = me;
95 }
96 #endif