]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_settings_game_messages.c
b0e01d19f0b816992af1d4287dc168e974364282
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game_messages.c
1 #ifdef INTERFACE
2 CLASS(XonoticGameMessageSettingsTab) EXTENDS(XonoticTab)
3         //METHOD(XonoticGameWeaponsSettingsTab, toString, string(entity))
4         METHOD(XonoticGameMessageSettingsTab, fill, void(entity))
5         METHOD(XonoticGameMessageSettingsTab, showNotify, void(entity))
6         ATTRIB(XonoticGameMessageSettingsTab, title, string, _("Messages"))
7         ATTRIB(XonoticGameMessageSettingsTab, intendedWidth, float, 0.9)
8         ATTRIB(XonoticGameMessageSettingsTab, rows, float, 13)
9         ATTRIB(XonoticGameMessageSettingsTab, columns, float, 6)
10         ATTRIB(XonoticGameMessageSettingsTab, weaponsList, entity, NULL)
11 ENDCLASS(XonoticGameMessageSettingsTab)
12 entity makeXonoticGameMessageSettingsTab();
13 #endif
14
15 #ifdef IMPLEMENTATION
16 void XonoticGameMessageSettingsTab_showNotify(entity me)
17 {
18         loadAllCvars(me);
19 }
20 entity makeXonoticGameMessageSettingsTab()
21 {
22         entity me;
23         me = spawnXonoticGameMessageSettingsTab();
24         me.configureDialog(me);
25         return me;
26 }
27
28 void XonoticGameMessageSettingsTab_fill(entity me)
29 {
30         entity e;
31
32         // todo:
33         // notification_CHOICE_CTF_CAPTURE_* CTF capture record
34         // notification_CHOICE_CTF_PICKUP_* CTF pickup verbose info
35         // notification_FRAG* Frag message verbose info
36         // notification_show_location Show location of deaths in death messages
37         // notification_show_sprees Show spree information
38         // notification_INFO_ITEM_WEAPON* Show weapon notifications in console
39         // Enable con_notify
40         // notification_ANNCE_NUM_RESPAWN* Add respawning countdown slider
41         // notification_ANNCE_NUM_ROUNDSTART* Add roundstart countdown slider
42         // notification_ANNCE_NUM_KILL* Add kill countdown slider
43         // notification_ANNCE_NUM_GAMESTART* Add gamestart countdown slider
44         // notification_ANNCE_ACHIEVEMENT* achievements toggle
45         // notification_ANNCE_KILLSTREAK* killstreak toggles
46
47         /// frag information
48         me.TR(me);
49                 me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Frag Information")));
50                         e.isBold = TRUE;
51                         e.alpha = 0.5;
52         me.TR(me);
53                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Display information about killing sprees")));
54         me.TR(me);
55                 me.TDempty(me, 0.2);
56                 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "notification_show_sprees_info_specialonly", _("Only display sprees if they are achievements")));
57                         makeMulti(e, "notification_show_sprees_center_specialonly");
58                         setDependent(e, "notification_show_sprees", 1, 1);
59         me.TR(me);
60                 me.TDempty(me, 0.2);
61                 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "notification_show_sprees_center", _("Show spree information in centerprints")));
62                         setDependent(e, "notification_show_sprees", 1, 1);
63         me.TR(me);
64                 me.TDempty(me, 0.2);
65                 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 0, "notification_show_sprees_info", _("Show spree information in death messages")));
66                         setDependent(e, "notification_show_sprees", 1, 1);
67         #if 0
68         me.TR(me);
69                 me.TDempty(me, 0.1);
70                 me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Sprees in info messages:")));
71                         setDependent(e, "notification_show_sprees", 1, 1);
72                 me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_show_sprees_info"));
73                         e.addValue(e, ZCTX(_("Disabled")), "0");
74                         e.addValue(e, ZCTX(_("Target")), "1");
75                         e.addValue(e, ZCTX(_("Attacker")), "2");
76                         e.addValue(e, ZCTX(_("Both")), "3");
77                         e.configureXonoticTextSliderValues(e);
78                         setDependent(e, "notification_show_sprees", 1, 1);
79         #endif
80         me.TR(me);
81                 me.TDempty(me, 0.4);
82                 me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print on a seperate line")));
83                         setDependent(e, "notification_show_sprees", 1, 1);
84         me.TR(me);
85                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_FRAG", _("Add extra frag information to centerprint when available")));
86                         makeMulti(e, "notification_CHOICE_FRAGGED notification_CHOICE_TYPEFRAG notification_CHOICE_TYPEFRAGGED");
87                         e.sendCvars = TRUE;
88         me.TR(me);
89                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available")));
90
91         me.gotoRC(me, 8.5, 0); me.setFirstColumn(me, me.currentColumn);
92                 me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Gamemode Settings")));
93                         e.isBold = TRUE;
94                         e.alpha = 0.5;
95         me.TR(me);
96                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_CAPTURE_TIME_RED", _("Display capture times in Capture The Flag")));
97                         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 ");
98                         e.sendCvars = TRUE;
99         me.TR(me);
100                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_CHOICE_CTF_PICKUP_ENEMY", _("Display name of flag stealer in Capture The Flag")));
101                         makeMulti(e, "notification_CHOICE_CTF_PICKUP_TEAM");
102                         e.sendCvars = TRUE;
103
104         me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
105                 me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Other")));
106                         e.isBold = TRUE;
107                         e.alpha = 0.5;
108         me.TR(me);
109                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(4, 1, "con_notify", _("Display console messages in the top left corner")));
110         me.TR(me);
111                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox")));
112         me.TR(me);
113                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_INFO_QUIT_DISCONNECT", _("Display player statuses in the chatbox")));
114                         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");
115         me.TR(me);
116         me.TR(me);
117                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications")));
118                         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");
119         me.TR(me);
120                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ITEM_WEAPON_DONTHAVE", _("Weapon centerprint notifications")));
121                         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"); 
122         me.TR(me);
123                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_INFO_ITEM_WEAPON_DONTHAVE", _("Weapon info message notifications")));
124                         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"); 
125
126         me.gotoRC(me, 8.5, 3.2); me.setFirstColumn(me, me.currentColumn);
127                 me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Announcers")));
128                         e.isBold = TRUE;
129                         e.alpha = 0.5;
130         #if 0
131         // there's just not enough room for this, and it's not important enough to justify...
132         me.TR(me);
133                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "notification_ANNCE_NUM_RESPAWN_1", _("Respawn countdown sounds")));
134                         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");
135         #endif
136         me.TR(me);
137                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(1, 0, "notification_ANNCE_KILLSTREAK_03", _("Killstreak sounds")));
138                         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");
139         me.TR(me);
140                 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(1, 0, "notification_ANNCE_ACHIEVEMENT_AIRSHOT", _("Achievement sounds")));
141                         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");
142
143         me.gotoRC(me, me.rows - 1, 0);
144                 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "echo stuff", COMMANDBUTTON_APPLY));
145 }
146 #endif