X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_settings_game_weapons.qc;h=5c77faffb501ed0ca2aebf740dd8d559548b94d4;hb=6afdf61d7ac0614d3a0c1bee447bfebc54566730;hp=1d75ecb49b39b0b2ba58293137c3d88051e53b32;hpb=42e255d014f2c6a1871177ea511f630624cdfb57;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc index 1d75ecb49..5c77faffb 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc @@ -3,6 +3,7 @@ #include "weaponslist.qh" #include "commandbutton.qh" #include "textlabel.qh" +#include "textslider.qh" #include "checkbox.qh" #include "button.qh" #include "radiobutton.qh" @@ -23,9 +24,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 +50,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); @@ -74,6 +73,18 @@ void XonoticGameWeaponsSettingsTab_fill(entity me) me.TD(me, 1, 1.0, e = makeXonoticRadioButton_T(1, "cl_gunalign", "3", _("Right align"), _("Position of the weapon model; requires reconnect"))); setDependent(e, "r_drawviewmodel", 1, 1); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Weapon model opacity:"))); + setDependent(e, "r_drawviewmodel", 1, 1); + + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_viewmodel_alpha")); + setDependent(e, "r_drawviewmodel", 1, 1); + e.addValue(e, "15%", "0.15"); + e.addValue(e, "25%", "0.25"); + e.addValue(e, "50%", "0.5"); + e.addValue(e, "75%", "0.75"); + e.addValue(e, "100%", "1"); + e.configureXonoticTextSliderValues(e); me.TR(me); me.TR(me); me.TDempty(me, 0.2);