2 minute read

Sorry I’m wasn’t writing more posts for a long time. I was busy with other things. But I was more active on twitter, you can Follow me on Twitter on twitter.

AdvancedText 1.2 github-release-version

Nodes

AdvancedTextLabel

  • extends RichTextLabel
  • adds support for Markdown and Ren’Py markups
  • adds support for Emojis-For-Godot using :emoji: syntax
  • adds support for variables in text using <var_name> syntax
  • adds support for headers
  • adds support for loading text files: *.txt, *.md and *.rpy

CodeEdit

  • extends TextEdit
  • adds support for loading any text files
  • adds highlighting using json configuration file ; included configs for: BBCode, Markdown, Ren’Py, GDScript and JSON in advanced-text/highlights folder.

Included Examples

In advanced-text/examples folder.

AdvancedTextButton

Shows how to combine AdvancedTextLabel with Button.

ClickMeToEdit

Shows how to add LineEdit to AdvancedTextButton, so it user can edit text in button.

There is also ClickMeToEditPopup example is the same, but uses Popup and CodeEdit instead of LineEdit.

TextBrowser

Show how to makes text browser that handles links to web sites and links to other text files in project.

Supported Markups

To all Markups AdvancedText adds:

  • adds support for Emojis-For-Godot using :emoji: syntax
  • adds support for variables in text using <var_name> syntax ; our variables in text solution works even with: Dictionary, Array, String as array, Color and Resource.

BBCode

The same as in build one in Godot, but with few extras:

  • adds support for headers using [H1] text [/H1] syntax

Ren’Py markup

Has few changes to comparing to original one:

  • for variables uses <var_name> instead of [var_name]
  • adds support for headers using {H1} text {/H1} syntax
  • adds support for all Godot BBCode tags just put them in {}

Markdown

AdvancedTextLabel uses RichTextLabel to render result so we just parse our markups to Godot BBCode so we need to change things.

Has few changes to comparing to standard one:

  • ![height x width](path/to/img) is used
  • only `code` is used
  • @u { text } is used for underline text
  • @tab { text } is used for indent text
  • @tabel=cells { | cell1 | cell2 | } is used for tables

But it also adds few features to our Markdown:

  • @color=color { text } is used for coloring text
  • @center { text } is used for centering text
  • @right { text } is used for right aligning text
  • @fill { text } is used for filling text
  • @effect args { text } is used for effects on text

This gif was made on Godot 3.4 version, maybe in newer version fade effect is fixed.

Godot MyST Docs Template

As ever of our projects will need a docs we made template to speed up setting them up.

  • It uses MyST as parser for Markdown
  • The same css as Godot Docs
  • Support GDScript highlighting by the same plugin that Godot Docs uses

Ever one can use this template: https://github.com/rakugoteam/Godot-MyST-Docs-Template

This is all for now. Merry Christmas and Happy New Year Godotters!

Categories: ,

Updated: