]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Menu: don't wire up some settings to the "Apply immediately" button since menu can...
authorterencehill <piuntn@gmail.com>
Sun, 25 Aug 2019 12:24:55 +0000 (14:24 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 25 Aug 2019 12:24:55 +0000 (14:24 +0200)
qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc
qcsrc/menu/xonotic/dialog_multiplayer_profile.qc
qcsrc/menu/xonotic/dialog_settings_game_view.qc
qcsrc/menu/xonotic/dialog_settings_game_weapons.qc
qcsrc/menu/xonotic/dialog_settings_user.qc

index afde0914a48b981db347492f8db456e31ae4da64..08730511217002e2b2e4db884532e68b1d5bce53 100644 (file)
@@ -39,6 +39,7 @@ void XonoticScreenshotBrowserTab_fill(entity me)
 
        me.gotoRC(me, 0, 3.1);
                me.TD(me, 1, 1.9, e = makeXonoticCheckBoxEx(2, 1, "cl_autoscreenshot", _("Auto screenshot scoreboard")));
+                       e.sendCvars = true;
                me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
                        e.onClick = ScreenshotList_Refresh_Click;
                        e.onClickEntity = slist;
index 8705e5ff7f7df8e5d3d17b5a67ee43af18ce7f02..f87e0dbbe05f905e761c37918868870f4968837a 100644 (file)
@@ -40,8 +40,6 @@ void XonoticProfileTab_fill(entity me)
                "name \"$_cl_name\";"
                "playermodel $_cl_playermodel;"
                "playerskin $_cl_playerskin;"
-               "sendcvar cl_allow_uidtracking;"
-               "sendcvar cl_allow_uid2name;"
                , COMMANDBUTTON_APPLY);
        profileApplyButton.disableOnClick = true;
 
@@ -127,11 +125,11 @@ void XonoticProfileTab_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.25);
                me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uidtracking", _("Allow player statistics to track your client")));
-                       e.applyButton = profileApplyButton;
+                       e.sendCvars = true;
        me.TR(me);
                me.TDempty(me, 0.25);
                me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname")));
-                       e.applyButton = profileApplyButton;
+                       e.sendCvars = true;
                        setDependent(e, "cl_allow_uidtracking", 1, 1);
        me.gotoRC(me, 4, 3.1); // TOP RIGHT
        //me.gotoRC(me, 12.5, 3.1); // BOTTOM RIGHT
index c1caddd7d4def04098368961477a35ba6eaa1e90..0b3a9ff6c4402253b2a30fb8ab277ab41b6a3c3d 100644 (file)
@@ -65,6 +65,7 @@ void XonoticGameViewSettingsTab_fill(entity me)
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
+                       e.sendCvars = true;
 
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
index 1d75ecb49b39b0b2ba58293137c3d88051e53b32..8eac7301abc705df0d96c214107ddb7683b5957a 100644 (file)
@@ -23,9 +23,7 @@ void XonoticGameWeaponsSettingsTab_fill(entity me)
 {
        entity e;
        entity weaponsApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0',
-               "sendcvar cl_autoswitch;"
                "sendcvar cl_weaponpriority;"
-               "sendcvar cl_weaponimpulsemode;"
                , COMMANDBUTTON_APPLY);
        weaponsApplyButton.disableOnClick = true;
 
@@ -51,12 +49,12 @@ void XonoticGameWeaponsSettingsTab_fill(entity me)
                        _("Make use of the list above when cycling through weapons with the mouse wheel")));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_weaponimpulsemode", _("Cycle through only usable weapon selections")));
-                       e.applyButton = weaponsApplyButton;
+                       e.sendCvars = true;
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_autoswitch", _("Auto switch weapons on pickup"),
                        _("Automatically switch to newly picked up weapons if they are better than what you are carrying")));
-                       e.applyButton = weaponsApplyButton;
+                       e.sendCvars = true;
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_unpress_attack_on_weapon_switch", _("Release attack buttons when you switch weapons")));
        me.TR(me);
index 27d6d4a82ec3a143f93ececce635ac37fba1892e..5e5b707faed5fd4d216b23a1348693d7bc2e712d 100644 (file)
@@ -17,8 +17,6 @@ entity makeXonoticUserSettingsTab()
 void XonoticUserSettingsTab_fill(entity me)
 {
        entity e, sk;
-       entity userApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle;", COMMANDBUTTON_APPLY);
-       userApplyButton.disableOnClick = true;
 
        me.TR(me);
                me.TDempty(me, 0.25);
@@ -73,9 +71,5 @@ void XonoticUserSettingsTab_fill(entity me)
        me.gotoRC(me, 11.5, 3.25); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 2.5, e = makeXonoticCheckBox_T(0, "cl_gentle", _("Disable gore effects and harsh language"),
                        _("Replace blood and gibs with content that does not have any gore effects")));
-                       e.applyButton = userApplyButton;
-
-       me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, 6, userApplyButton);
-
+                       e.sendCvars = true;
 }