In your dialog handler you need to find the action id that's produced when a player clicks on the text.
Then in the clicking buttons handler class you need to add the case of your action id or change the current one that's set, and make it do what you desire.