Merge branch 'TimePath/qc_updates' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game_messages.qc
1 #ifndef DIALOG_SETTINGS_GAME_MESSAGES_H
2 #define DIALOG_SETTINGS_GAME_MESSAGES_H
3 #include "tab.qc"
4 CLASS(XonoticGameMessageSettingsTab, XonoticTab)
5         //METHOD(XonoticGameWeaponsSettingsTab, toString, string(entity))
6         METHOD(XonoticGameMessageSettingsTab, fill, void(entity))
7         METHOD(XonoticGameMessageSettingsTab, showNotify, void(entity))
8         ATTRIB(XonoticGameMessageSettingsTab, title, string, _("Messages"))
9         ATTRIB(XonoticGameMessageSettingsTab, intendedWidth, float, 0.9)
10         ATTRIB(XonoticGameMessageSettingsTab, rows, float, 13)
11         ATTRIB(XonoticGameMessageSettingsTab, columns, float, 6)
12         ATTRIB(XonoticGameMessageSettingsTab, weaponsList, entity, NULL)
13 ENDCLASS(XonoticGameMessageSettingsTab)
14 entity makeXonoticGameMessageSettingsTab();
15 #endif
16
17 #ifdef IMPLEMENTATION
18 void XonoticGameMessageSettingsTab_showNotify(entity me)
19 {
20         loadAllCvars(me);
21 }
22 entity makeXonoticGameMessageSettingsTab()
23 {
24         entity me;
25         me = NEW(XonoticGameMessageSettingsTab);
26         me.configureDialog(me);
27         return me;
28 }
29
30 void XonoticGameMessageSettingsTab_fill(entity me)
31 {
32         entity e;
33
34         me.TR(me);
35                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Frag Information")));
36         me.TR(me);
37                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Display information about killing sprees")));
38         me.TR(me);
39                 me.TDempty(me, 0.2);
40                 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "notification_show_sprees_info_specialonly", _("Only display sprees if they are achievements")));
41                         makeMulti(e, "notification_show_sprees_center_specialonly");
42                         setDependent(e, "notification_show_sprees", 1, 1);
43         me.TR(me);
44                 me.TDempty(me, 0.2);
45                 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "notification_show_sprees_center", _("Show spree information in centerprints")));
46                         setDependent(e, "notification_show_sprees", 1, 1);
47         me.TR(me);
48                 me.TDempty(me, 0.2);
49                 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 0, "notification_show_sprees_info", _("Show spree information in death messages")));
50                         setDependent(e, "notification_show_sprees", 1, 1);
51         #if 0
52         me.TR(me);
53                 me.TDempty(me, 0.1);
54                 me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Sprees in info messages:")));
55                         setDependent(e, "notification_show_sprees", 1, 1);
56                 me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_show_sprees_info"));
57                         e.addValue(e, ZCTX(_("SPREES^Disabled")), "0");
58                         e.addValue(e, _("Target"), "1");
59                         e.addValue(e, _("Attacker"), "2");
60                         e.addValue(e, ZCTX(_("SPREES^Both")), "3");
61                         e.configureXonoticTextSliderValues(e);
62                         setDependent(e, "notification_show_sprees", 1, 1);
63         #endif
64         me.TR(me);
65                 me.TDempty(me, 0.4);
66                 me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print on a seperate line")));
67                         setDependent(e, "notification_show_sprees", 1, 1);
68         me.TR(me);
69                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_FRAG", _("Add extra frag information to centerprint when available")));
70                         makeMulti(e, "notification_CHOICE_FRAGGED notification_CHOICE_TYPEFRAG notification_CHOICE_TYPEFRAGGED");
71                         e.sendCvars = true;
72         me.TR(me);
73                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available")));
74
75         me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn);
76                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gamemode Settings")));
77         me.TR(me);
78                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_CAPTURE_TIME_RED", _("Display capture times in Capture The Flag")));
79                         makeMulti(e, "notification_CHOICE_CTF_CAPTURE_TIME_BLUE notification_CHOICE_CTF_CAPTURE_BROKEN_RED notification_CHOICE_CTF_CAPTURE_BROKEN_BLUE notification_CHOICE_CTF_CAPTURE_UNBROKEN_RED notification_CHOICE_CTF_CAPTURE_UNBROKEN_BLUE ");
80                         e.sendCvars = true;
81         me.TR(me);
82                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_PICKUP_ENEMY", _("Display name of flag stealer in Capture The Flag")));
83                         makeMulti(e, "notification_CHOICE_CTF_PICKUP_TEAM");
84                         e.sendCvars = true;
85
86         me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
87                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
88         me.TR(me);
89                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(4, 1, "con_notify", _("Display console messages in the top left corner")));
90         me.TR(me);
91                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox")));
92         me.TR(me);
93                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_INFO_QUIT_DISCONNECT", _("Display player statuses in the chatbox")));
94                         makeMulti(e, "notification_INFO_QUIT_KICK_IDLING notification_INFO_JOIN_CONNECT_TEAM_BLUE notification_INFO_JOIN_CONNECT_TEAM_PINK notification_INFO_JOIN_CONNECT_TEAM_RED notification_INFO_JOIN_CONNECT_TEAM_YELLOW");
95         me.TR(me);
96         me.TR(me);
97                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications")));
98                         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 notification_INFO_POWERUP_INVISIBILITY notification_INFO_POWERUP_SHIELD notification_INFO_POWERUP_SPEED notification_INFO_POWERUP_STRENGTH");
99         me.TR(me);
100                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ITEM_WEAPON_DONTHAVE", _("Weapon centerprint notifications")));
101                         makeMulti(e, "notification_CENTER_ITEM_WEAPON_DROP notification_CENTER_ITEM_WEAPON_GOT notification_CENTER_ITEM_WEAPON_NOAMMO notification_CENTER_ITEM_WEAPON_PRIMORSEC notification_CENTER_ITEM_WEAPON_UNAVAILABLE");
102         me.TR(me);
103                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_INFO_ITEM_WEAPON_DONTHAVE", _("Weapon info message notifications")));
104                         makeMulti(e, "notification_INFO_ITEM_WEAPON_DROP notification_INFO_ITEM_WEAPON_GOT notification_INFO_ITEM_WEAPON_NOAMMO notification_INFO_ITEM_WEAPON_PRIMORSEC notification_INFO_ITEM_WEAPON_UNAVAILABLE");
105
106         me.gotoRC(me, 9, 3.2); me.setFirstColumn(me, me.currentColumn);
107                 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Announcers")));
108         #if 0
109         // there's just not enough room for this, and it's not important enough to justify...
110         me.TR(me);
111                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "notification_ANNCE_NUM_RESPAWN_1", _("Respawn countdown sounds")));
112                         makeMulti(e, "notification_ANNCE_NUM_RESPAWN_2 notification_ANNCE_NUM_RESPAWN_3 notification_ANNCE_NUM_RESPAWN_4 notification_ANNCE_NUM_RESPAWN_5 notification_ANNCE_NUM_RESPAWN_6 notification_ANNCE_NUM_RESPAWN_7 notification_ANNCE_NUM_RESPAWN_8 notification_ANNCE_NUM_RESPAWN_9 notification_ANNCE_NUM_RESPAWN_10");
113         #endif
114         me.TR(me);
115                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(1, 0, "notification_ANNCE_KILLSTREAK_03", _("Killstreak sounds")));
116                         makeMulti(e, "notification_ANNCE_KILLSTREAK_05 notification_ANNCE_KILLSTREAK_10 notification_ANNCE_KILLSTREAK_15 notification_ANNCE_KILLSTREAK_20 notification_ANNCE_KILLSTREAK_25 notification_ANNCE_KILLSTREAK_30");
117         me.TR(me);
118                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(1, 0, "notification_ANNCE_ACHIEVEMENT_AIRSHOT", _("Achievement sounds")));
119                         makeMulti(e, "notification_ANNCE_ACHIEVEMENT_AMAZING notification_ANNCE_ACHIEVEMENT_AWESOME notification_ANNCE_ACHIEVEMENT_BOTLIKE notification_ANNCE_ACHIEVEMENT_ELECTROBITCH notification_ANNCE_ACHIEVEMENT_IMPRESSIVE notification_ANNCE_ACHIEVEMENT_YODA");
120 }
121 #endif