MarkdownLabel icon indicating copy to clipboard operation
MarkdownLabel copied to clipboard

Add checkbox support

Open RibalGZ opened this issue 2 years ago • 1 comments

Display checkboxes when parsing [] and [x]. It should also provide a signal when the state changes.

RibalGZ avatar Nov 27 '23 15:11 RibalGZ

That would be cool but I don't see a straight forward way of implementing it, since Godot's RichTextLabel doesn't have checkboxes.

Two possibilities occur to me (just thinking out loud, in case someone else wants to contribute to this):

  • Display checkboxes as a special character or icon (like ☐), with a [url] tag that recognizes clicking on it and changes it to a checked box icon (like ☑), as well as emitting a signal.
  • Somehow using actual CheckBox objects. These would need to be dynamically created and should react in the same way as the rest of the text (scrolling with it, etc.).

The first way is probably more appropiate.

daenvil avatar Nov 27 '23 19:11 daenvil