X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_multiplayer_profile.qc;h=c316318b3a48d04532cd5208a679f0baf7b93fa3;hb=92749b51e06f4fd2a89d7593a9db7500818ad2fd;hp=449a35e809a94b6f7ae1f1112d2d239933032ad9;hpb=201f6309c92217b63dc34daf004fbb7424096eca;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 449a35e80..c316318b3 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -33,6 +33,15 @@ void XonoticProfileTab_fill(entity me) { entity e, pms, label, box; float i; + entity profileApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0', + "color -1 -1;" + "name \"$_cl_name\";" + "playermodel $_cl_playermodel;" + "playerskin $_cl_playerskin;" + "sendcvar cl_allow_uidtracking;" + "sendcvar cl_allow_uid2name;" + , COMMANDBUTTON_APPLY); + profileApplyButton.disableOnClick = true; // ============== // NAME SECTION @@ -55,6 +64,7 @@ void XonoticProfileTab_fill(entity me) box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 0; // Sorry, can't do this, it spams "name" commands. box.enableClearButton = 0; + box.applyButton = profileApplyButton; label.textEntity = box; me.TR(me); me.TD(me, 5, 1, e = makeXonoticColorpicker(box)); @@ -75,10 +85,12 @@ void XonoticProfileTab_fill(entity me) me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0')); e.onClick = PlayerModelSelector_Prev_Click; e.onClickEntity = pms; + e.applyButton = profileApplyButton; me.TD(me, 11.5, 1.4, pms); me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0')); e.onClick = PlayerModelSelector_Next_Click; e.onClickEntity = pms; + e.applyButton = profileApplyButton; //me.setFirstColumn(me, me.currentColumn + 2); // MODEL LEFT, COLOR RIGHT me.gotoRC(me, me.currentRow, 0); me.setFirstColumn(me, me.currentColumn); // MODEL RIGHT, COLOR LEFT @@ -89,6 +101,7 @@ void XonoticProfileTab_fill(entity me) if(mod(i, 5) == 0) me.TR(me); me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0'); + e.applyButton = profileApplyButton; } me.TR(me); me.TR(me); @@ -98,6 +111,7 @@ void XonoticProfileTab_fill(entity me) if(mod(i, 5) == 0) me.TR(me); me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0'); + e.applyButton = profileApplyButton; } // ==================== @@ -111,10 +125,12 @@ 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; 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"))); - setDependent(e, "cl_allow_uidtracking", 1, 1); + e.applyButton = profileApplyButton; + setDependent(e, "cl_allow_uidtracking", 1, 1); me.gotoRC(me, 4, 3.1); // TOP RIGHT //me.gotoRC(me, 12.5, 3.1); // BOTTOM RIGHT //me.gotoRC(me, 12.5, 0); // BOTTOM LEFT @@ -161,6 +177,6 @@ void XonoticProfileTab_fill(entity me) #endif me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); + me.TD(me, 1, me.columns, profileApplyButton); } #endif