From f61589fb31aa481f64b57d9b5fb4f01126181289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Thu, 12 Oct 2023 12:59:34 +0200 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fc78465..68ba3f8 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,13 @@ Split a word into it's characters, including the creation of the gui nodes. Each ### richtext.on_click(words, action) -Call this function when a click/touch has been detected and your text contains words with an `a` tag. These words act as "hyperlinks" and will generate a message when clicked. +Call this function when a click/touch has been detected and your text contains words with an `a` tag. These words act as "hyperlinks" and will generate a message when clicked. The generated message will contain the following values: + +* `node_id` (hash) - Id of the node which was clicked +* `text` (string) - Text of the clicked word +* `screen_x` (number) - Horizontal position of the click +* `screen_y` (number) - Vertical position of the click +* `tags` (table) - All tags on the clicked word **PARAMETERS** * `words` (table) - A list of words, as received from `richtext.create()` or `richtext.tagged()`.