YarnMarkupPalette
a collection of marker names and formatting styles for the palette processor. supports basic markers (colour, bold, italic, etc.) and custom markers (arbitrary start/end tag strings).
class_name YarnMarkupPalette
extends ResourceInherits from Resource
#Nested Types
- BasicMarker classsimple formatting with colour, bold, italic, underline, strikethrough.
- CustomMarker classarbitrary start/end tag strings for complex formatting effects.
#Properties
#basic_markers
basic markers stored as dictionaries for inspector editing.
var basic_markers: Array[Dictionary] = []Type Array[Dictionary]
#custom_markers
custom markers stored as dictionaries for inspector editing.
var custom_markers: Array[Dictionary] = []Type Array[Dictionary]
#Methods
#add_basic_marker(String, bool, Color, bool, bool, bool, bool)
adds a basic marker at runtime (added to both cache and exported array).
func add_basic_marker(marker_name: String, use_color: bool = false, marker_color: Color = Color(1, 1, 1, 1), bold: bool = false, italic: bool = false, underline: bool = false, strikethrough: bool = false) -> voidParameters
marker_nameStringuse_colorboolmarker_colorColorboldboolitalicboolunderlineboolstrikethroughbool
#add_custom_marker(String, String, String, int, int)
adds a custom marker at runtime (added to both cache and exported array).
func add_custom_marker(marker_name: String, start_tags: String, end_tags: String, offset: int = 0, visible_chars: int = 0) -> voidParameters
marker_nameStringstart_tagsStringend_tagsStringoffsetintvisible_charsint
#color_for_marker(String)
returns {"found": bool, "color": Color} for a marker name.
func color_for_marker(marker_name: String) -> DictionaryParameters
marker_nameString
Returns Dictionary
#get_all_marker_names()
returns all marker names defined in this palette.
func get_all_marker_names() -> Array[String]Returns Array[String]
#invalidate_cache()
clears the internal cache, forcing rebuild on next access.
func invalidate_cache() -> void#palette_for_marker(String)
returns formatting as start/end tags for a marker name. basic markers are converted to bbcode; custom markers return as-is.
func palette_for_marker(marker_name: String) -> DictionaryParameters
marker_nameString
Returns Dictionary
Generated from Yarn Spinner for Godot GDScript 3.3.