]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_settings_game_messages.qc
Really disable console messages if "Display console messages in the top left corner...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_game_messages.qc
index 1cc20387705a241c7c29c5fba07b407a15ebfc9e..3029f30ced405d7af5d1045e20d554201977e821 100644 (file)
@@ -1,21 +1,9 @@
-#ifndef DIALOG_SETTINGS_GAME_MESSAGES_H
-#define DIALOG_SETTINGS_GAME_MESSAGES_H
-#include "tab.qc"
-CLASS(XonoticGameMessageSettingsTab, XonoticTab)
-       METHOD(XonoticGameMessageSettingsTab, fill, void(entity));
-       METHOD(XonoticGameMessageSettingsTab, showNotify, void(entity));
-       ATTRIB(XonoticGameMessageSettingsTab, title, string, _("Messages"))
-       ATTRIB(XonoticGameMessageSettingsTab, intendedWidth, float, 0.9)
-       ATTRIB(XonoticGameMessageSettingsTab, rows, float, 13)
-       ATTRIB(XonoticGameMessageSettingsTab, columns, float, 6)
-       ATTRIB(XonoticGameMessageSettingsTab, weaponsList, entity, NULL)
-ENDCLASS(XonoticGameMessageSettingsTab)
-entity makeXonoticGameMessageSettingsTab();
-#include "../gamesettings.qh"
-REGISTER_SETTINGS(Messages, makeXonoticGameMessageSettingsTab());
-#endif
+#include "dialog_settings_game_messages.qh"
+
+#include "textlabel.qh"
+#include "checkbox.qh"
+#include "textslider.qh"
 
-#ifdef IMPLEMENTATION
 void XonoticGameMessageSettingsTab_showNotify(entity me)
 {
        loadAllCvars(me);
@@ -35,7 +23,7 @@ void XonoticGameMessageSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Frag Information")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Display information about killing sprees")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "notification_show_sprees", _("Display information about killing sprees"), "-"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "notification_show_sprees_info_specialonly", _("Only display sprees if they are achievements"), "-"));
@@ -43,18 +31,18 @@ void XonoticGameMessageSettingsTab_fill(entity me)
                        setDependent(e, "notification_show_sprees", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "notification_show_sprees_center", _("Show spree information in centerprints")));
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "notification_show_sprees_center", _("Show spree information in centerprints"), "-"));
                        setDependent(e, "notification_show_sprees", 1, 1);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 0, "notification_show_sprees_info", _("Show spree information in death messages")));
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "notification_show_sprees_info", _("Show spree information in death messages"), "-"));
                        setDependent(e, "notification_show_sprees", 1, 1);
        #if 0
        me.TR(me);
                me.TDempty(me, 0.1);
                me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Sprees in info messages:")));
                        setDependent(e, "notification_show_sprees", 1, 1);
-               me.TD(me, 1, 2, e = makeXonoticTextSlider("notification_show_sprees_info"));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider_T("notification_show_sprees_info", "-"));
                        e.addValue(e, ZCTX(_("SPREES^Disabled")), "0");
                        e.addValue(e, _("Target"), "1");
                        e.addValue(e, _("Attacker"), "2");
@@ -64,14 +52,14 @@ void XonoticGameMessageSettingsTab_fill(entity me)
        #endif
        me.TR(me);
                me.TDempty(me, 0.4);
-               me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print on a seperate line")));
+               me.TD(me, 1, 2.6, e = makeXonoticCheckBox_T(0, "notification_show_sprees_info_newline", _("Print on a seperate line"), "-"));
                        setDependent(e, "notification_show_sprees", 1, 1);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_CHOICE_FRAG", _("Add extra frag information to centerprint when available"), "-"));
                        makeMulti(e, "notification_CHOICE_FRAGGED notification_CHOICE_TYPEFRAG notification_CHOICE_TYPEFRAGGED");
                        e.sendCvars = true;
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_show_location", _("Add frag location to death messages when available")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "notification_show_location", _("Add frag location to death messages when available"), "-"));
 
        me.gotoRC(me, 9, 0); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Gamemode Settings")));
@@ -87,9 +75,9 @@ void XonoticGameMessageSettingsTab_fill(entity me)
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(4, 1, "con_notify", _("Display console messages in the top left corner")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(4, 0, "con_notify", _("Display console messages in the top left corner"), "-"));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox")));
+               me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_allow_chatboxprint", _("Display all info messages in the chatbox"), "-"));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 1, "notification_INFO_QUIT_DISCONNECT", _("Display player statuses in the chatbox"), "-"));
                        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");
@@ -106,12 +94,9 @@ void XonoticGameMessageSettingsTab_fill(entity me)
 
        me.gotoRC(me, 9, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Announcers")));
-       #if 0
-       // there's just not enough room for this, and it's not important enough to justify...
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(2, 0, "notification_ANNCE_NUM_RESPAWN_1", _("Respawn countdown sounds"), "-"));
                        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");
-       #endif
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(1, 0, "notification_ANNCE_KILLSTREAK_03", _("Killstreak sounds"), "-"));
                        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");
@@ -119,4 +104,3 @@ void XonoticGameMessageSettingsTab_fill(entity me)
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx_T(1, 0, "notification_ANNCE_ACHIEVEMENT_AIRSHOT", _("Achievement sounds"), "-"));
                        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");
 }
-#endif