-------------------------------
-- SSTRP
-- Author: MNWRP
--
-- cl_binds.lua
-- Changes what keys do.
-------------------------------

ContextEnabled = false;

function GM:PlayerBindPress( ply, bind, pressed )
	
	if( bind == "+use" ) then
	
		local trent = LocalPlayer( ):GetEyeTrace( ).Entity;
		
		if( trent != nil and trent:IsValid( ) and IsDoor( trent ) ) then
		
			LocalPlayer( ):ConCommand( "rp_opendoor" );
			
		end
		
	end

end

function GM:OnContextMenuOpen()

	ContextEnabled = true;
	gui.EnableScreenClicker( true )
	HiddenButton:SetVisible( true );
	
end

function GM:OnContextMenuClose()

	ContextEnabled = false;
	gui.EnableScreenClicker( false );
	HiddenButton:SetVisible( false );
	
end
