How to make drew text do function after clicked?

example i made this code


this.drawText("->", 0, 0, this.contentsWidth(), "right");
this.drawText("OK", 0, 0, this.contentsWidth(), "center");
this.drawText("<-", 0, 0, this.contentsWidth(), "left");


or


var text = $dataSystem.gameTitle;
this._gameTitleSprite.bitmap.outlineColor = 'blue';
this._gameTitleSprite.bitmap.outlineWidth = 8;
this._gameTitleSprite.bitmap.fontSize = 50;
this._gameTitleSprite.bitmap.drawText(text, 0,0 , maxWidth, 48, 'center');




and how to make the text that i drew can be clicked and do a function or run code after that.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-drew-text-do-function-after-clicked.65048/