How to detect click on a tile?

My code is based on rendercam.screen_to_world_2d and it was quickly used in on_input here