New function to set mode and text before overlayView is shown

Function with title and mode as param in order to set view before it
shows.