GodotASCIIToolKit version alpha 0.1!


Launch of the GodotASCIIToolKit version 0.1

Summary

This new version:

  1. Completely removes the autolad ASCIISettings which was causing errors in the Godot editor when first enabling the plugin. Instead, it relies on ProjectSettings.
  2. Adds the notion of ASCIIThemes, which is basically a custom Godot Resource which handles the graphical appearance (i.e. which characters are used) of the custom types!

More details about ASCIIThemes

  1. So, What is an ASCII theme?

What I call ASCII Theme is a string containing characters used to build ASCII UI elements. Each index in the string correspond to a given “character function”. For instance, the character at index 0 is used as a vertical line, the character at index 1 as an horizontal line, etc.

  1. How does it work in practice?

In practice, all available themes are embedded within a Godot custom Resource called ASCIIThemes. ASCIIThemes contains a Dictionary[String, String] which makes the correspondance between themes names and their respective constitutive strings (i.e. the string containing the characters used to build graphical elements such as corners or lines). ASCIIThemes also contains an enum embedding the correspondance between the character fonction and the index in the constitutive string:

enum {
	VERTICAL_LINE,
	HORIZONTAL_LINE,
	TOP_LEFT_CORNER,
	TOP_RIGHT_CORNER,
	BOTTOM_LEFT_CORNER,
	BOTTOM_RIGHT_CORNER,
}
  1. How to add custom themes?

When the plugin is enabled, the file res://addons/GodotASCIIToolKit/Resources/ASCIIResources/ascii_themes.tres is (if it does not exists) created from the ASCIIThemes Resource. This way, the user can add custom new themes by editing this file directly in the Godot editor!

Another way, for customizing only one instance for an ASCII tool that derives from ASCIICustomBox is to modify its box_chars property.

Files

godot_ascii_toolkit-0.1.zip 47 kB
1 day ago

Get Godot ASCII ToolKit

Leave a comment

Log in with itch.io to leave a comment.