Multi-directional Mouse Wheel Support

Updated the mouse wheel function to handle multi-directional scroll directions.