]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_notification.c
1ae57363c3be25cc2cb58cb184671d6110e3651c
[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.8)
9         ATTRIB(XonoticNotificationDialog, rows, float, 20)
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, 1, e = makeXonoticTextLabel(0, _("Centerprint time:")));
34                 me.TD(me, 1, 2, e = makeXonoticSlider(0, 3, 0.1, "notification_item_centerprinttime"));
35         me.TR(me);
36                 me.TDempty(me, 0.1);
37                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_allow_chatboxprint", _("Print all notifications into the chatbox")));
38         me.TR(me);
39                 me.TDempty(me, 0.1);
40                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_MOTD", _("Centerprint the MOTD")));
41         me.TR(me);
42                 me.TDempty(me, 0.1);
43                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Notice joining/quiting players:")));
44                 me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_INFO_QUIT_DISCONNECT"));
45                         //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");
46                         e.addValue(e, ZCTX(_("off")), "0");
47                         e.addValue(e, ZCTX(_("only console")), "1");
48                         e.addValue(e, ZCTX(_("console & chat")), "2");
49                         e.configureXonoticTextSliderValues(e);
50         me.TR(me);
51                 me.TDempty(me, 0.1);
52                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_TEAMCHANGE_AUTO", _("Centerprint teamchanges")));
53                         //makeMulti(e, "notification_CENTER_TEAMCHANGE_BLUE notification_CENTER_TEAMCHANGE_PINK notification_CENTER_TEAMCHANGE_RED notification_CENTER_TEAMCHANGE_SPECTATE notification_CENTER_TEAMCHANGE_SUICIDE notification_CENTER_TEAMCHANGE_YELLOW");
54         me.TR(me);
55                 me.TDempty(me, 0.1);
56                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_ITEM_WEAPON_DONTHAVE", _("Item notifications")));
57         me.TR(me);
58                 me.TDempty(me, 0.1);
59                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications")));
60                         //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");
61                         
62         me.TR(me);
63                 
64         // Gamemode dependent notifications
65         me.TR(me);
66                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Gamemode specific Notifications:")));
67         me.TR(me);
68                 me.TDempty(me, 0.1);
69                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Arena notifications:")));
70         me.TR(me);
71                 me.TDempty(me, 0.2);
72                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_ARENA_BEGIN", _("Centerprint information for arena")));
73                         //makeMulti(me, "notification_CENTER_ARENA_NEEDPLAYER notification_CENTER_ARENA_ROUNDSTART");
74                 
75         me.TR(me);
76                 me.TDempty(me, 0.1);
77                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Assault notifications:")));
78         me.TR(me);
79                 me.TDempty(me, 0.2);
80                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_ASSAULT_ATTACKING", _("Centerprint information for assault")));
81                         //makeMulti(me, "notification_CENTER_ASSAULT_DEFENDING");
82                 
83         me.TR(me);
84                 me.TDempty(me, 0.1);
85                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("CTF notifications:")));
86         me.TR(me);
87                 me.TDempty(me, 0.2);
88                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_CTF_PICKUP_BLUE", _("Centerprint information for ctf")));
89                         //makeMulti(me, "notification_CENTER_CTF_PICKUP_ENEMY notification_CENTER_CTF_PICKUP_RED notification_CENTER_CTF_PICKUP_TEAM");
90                 
91         me.TR(me);
92                 me.TDempty(me, 0.1);
93                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Freezetag notifications:")));
94         me.TR(me);
95                 me.TDempty(me, 0.2);
96                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_FREEZETAG_FREEZE", _("Centerprint information for freezetag")));
97                         //makeMulti(me, "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");
98                 
99         me.TR(me);
100                 me.TDempty(me, 0.1);
101                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Keepaway notifications:")));
102         me.TR(me);
103                 me.TDempty(me, 0.2);
104                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_KEEPAWAY_DROPPED", _("Centerprint information for keepaway")));
105                         //makeMulti(me, "notification_CENTER_KEEPAWAY_PICKUP notification_CENTER_KEEPAWAY_WARN");
106                         
107         me.TR(me);
108                 me.TDempty(me, 0.1);
109                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Keyhunt notifications:")));
110         me.TR(me);
111                 me.TDempty(me, 0.2);
112                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_KEYHUNT_HELP", _("Centerprint information for keyhunt")));
113                         //makeMulti(me, "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");
114                         
115         me.TR(me);
116                 me.TDempty(me, 0.1);
117                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("LMS notifications:")));
118         me.TR(me);
119                 me.TDempty(me, 0.2);
120                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_LMS_CAMPCHECK", _("Centerprint information for LMS")));
121         
122         me.TR(me);
123         
124         // Information on killingsprees
125         me.TR(me);
126                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Information on killingsprees:")));
127         me.TR(me);
128                 //me.TDempty(me, 0.1);
129                 me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Print information on sprees")));
130         me.TR(me);
131                 //me.TDempty(me, 0.1);
132                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Show spree information:")));
133                 me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_show_sprees_info"));
134                         e.addValue(e, ZCTX(_("off")), "0");
135                         e.addValue(e, ZCTX(_("target")), "1");
136                         e.addValue(e, ZCTX(_("attacker")), "2");
137                         e.addValue(e, ZCTX(_("target and attacker")), "3");
138                         e.configureXonoticTextSliderValues(e);
139         me.TR(me);
140                 //me.TDempty(me, 0.1);
141                 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print spree information in a new line")));
142                 
143         // Close this dialog
144         me.gotoRC(me, me.rows - 1, 0);
145                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
146                         e.onClick = Dialog_Close;
147                         e.onClickEntity = me;
148 }
149 #endif