//credits to XHud

alias dh_hudplayerclass_dump 		"" //empty by default
alias dh_viewmodel_dump				""
alias dh_chatpos_dump				""
alias dh_blur_dump					""

alias dh_full_reload "toggle mat_aaquality; hud_reloadscheme"


//hud defaults:
alias dh_hudplayerclass_write 		"echo DeerNod {visible 1} PlayerStatusClassImage {xpos 10}" // initiate the default
alias dh_viewmodel_write			"echo TransparentViewmodelMask {visible	0}"
alias dh_chatpos_write				"echo HudChat {xpos 10 		ypos 265}"
alias dh_blur_write					"echo BlurBG {visible 1} DarkBG {visible 0}"
//for generating the thing:


//nodding deer and class icon:
//									VVV save the selected setting to #deerhud_custom_selected.txt		VVV write to #deerhud_custom.txt through deerhud_generate.cfg												
alias dh_hudplayerclass_default 	"alias dh_hudplayerclass_dump 	echo dh_hudplayerclass_default;		alias dh_hudplayerclass_write 	echo DeerNod {visible 1} PlayerStatusClassImage {xpos 10}"
alias dh_hudplayerclass_neither 	"alias dh_hudplayerclass_dump 	echo dh_hudplayerclass_neither;		alias dh_hudplayerclass_write 	echo DeerNod {visible 0} PlayerStatusClassImage {xpos 9999}"
alias dh_hudplayerclass_nodeer 		"alias dh_hudplayerclass_dump 	echo dh_hudplayerclass_nodeer;		alias dh_hudplayerclass_write 	echo DeerNod {visible 0} PlayerStatusClassImage {xpos 10}"
alias dh_hudplayerclass_noicon		"alias dh_hudplayerclass_dump 	echo dh_hudplayerclass_noicon;		alias dh_hudplayerclass_write 	echo DeerNod {visible 1} PlayerStatusClassImage {xpos 9999}"

//viewmodel transparency
alias dh_viewmodel_0 		"alias dh_viewmodel_dump 		echo dh_viewmodel_0;		alias dh_viewmodel_write 	echo TransparentViewmodelMask {visible	0}"
alias dh_viewmodel_25 		"alias dh_viewmodel_dump 		echo dh_viewmodel_25;		alias dh_viewmodel_write 	echo TransparentViewmodelMask {visible	1 image replay/thumbnails/refract/viewmodel_25}"
alias dh_viewmodel_50 		"alias dh_viewmodel_dump 		echo dh_viewmodel_50;		alias dh_viewmodel_write 	echo TransparentViewmodelMask {visible	1 image replay/thumbnails/refract/viewmodel_50}"
alias dh_viewmodel_75		"alias dh_viewmodel_dump 		echo dh_viewmodel_75;		alias dh_viewmodel_write 	echo TransparentViewmodelMask {visible	1 image replay/thumbnails/refract/viewmodel_75}"

//chat position
alias dh_chatpos_topleft		"alias dh_chatpos_dump 		echo dh_chatpos_topleft;		alias dh_chatpos_write		echo HudChat {xpos 10 		ypos 100}"
alias dh_chatpos_topright 		"alias dh_chatpos_dump 		echo dh_chatpos_topright;		alias dh_chatpos_write		echo HudChat {xpos rs1.0	ypos 100}"
alias dh_chatpos_bottomleft 	"alias dh_chatpos_dump 		echo dh_chatpos_bottomleft;		alias dh_chatpos_write		echo HudChat {xpos 10 		ypos 265}"
alias dh_chatpos_bottomright	"alias dh_chatpos_dump 		echo dh_chatpos_bottomright;	alias dh_chatpos_write		echo HudChat {xpos rs1.0	ypos 265}"



alias dh_blur_on 	"alias dh_blur_dump 	echo dh_blur_on;		alias dh_blur_write		echo BlurBG {visible 1} DarkBG {visible 0}"
alias dh_blur_off	"alias dh_blur_dump 	echo dh_blur_off;		alias dh_blur_write		echo BlurBG {visible 0} DarkBG {visible 1}"


//toggle voicechat enabled
alias dh_toggle_vc "dh_enable_vc"
alias dh_enable_vc	"voice_enable 1; alias dh_toggle_vc dh_disable_vc; 			echo Deerhud: --- voice enabled --- "
alias dh_disable_vc	"voice_enable 0; alias dh_toggle_vc dh_enable_vc;  			echo Deerhud: --- voice disabled --- "




//////////////////////////////////////
//									//
//			Custom Keybinds			//
//									//
//////////////////////////////////////
//(dh_ stands for deerhud)

alias dh_toggle_viewmodel "incrementvar r_drawviewmodel 0 1 1"

alias +dh_fakezoom "fov_desired 50"
alias -dh_fakezoom "fov_desired 90"

//credits to [EXG]	https://gamebanana.com/scripts/4020
//toggle to voicechat
alias dh_voicetoggle "dh_voicetoggleon"
alias dh_voicetoggleon "+voicerecord; alias dh_voicetoggle dh_voicetoggleoff"
alias dh_voicetoggleoff "-voicerecord; alias dh_voicetoggle dh_voicetoggleon"

//credits to povohat https://gamebanana.com/scripts/9842
//null-canceling movement binds
alias +mf"-back;+forward;alias cf +forward"
alias +mb"-forward;+back;alias cb +back"
alias +ml"-moveright;+moveleft;alias cl +moveleft"
alias +mr"-moveleft;+moveright;alias cr +moveright"
alias -mf"-forward;cb;alias cf"
alias -mb"-back;cf;alias cb"
alias -ml"-moveleft;cr;alias cl"
alias -mr"-moveright;cl;alias cr"
alias cf
alias cb
alias cl
alias cr
///////////////////////////////////////////////

//load customizations
exec #deerhud_custom_selected.txt