Skip to main content

The "sys_text_style_init" Function

Syntax#

sys_text_style_init(entity, index, name, font, col1, col2, col3, col4, shadow, outline);
ArgumentTypeDescription
entityintegerThe data structure of the entity to be styled
indexintegerThe index of the row containing the target entity
namestringThe character name under which inheritance data is/will be stored
fontfont/macroThe font to draw text in, where fnt_default is default (or keyword 'inherit' for saved style)
col1color/macroThe text top-left gradient color, where c_white is default (or keyword 'previous' for no change, or keyword 'inherit' for saved style)
col2color/macroThe text top-right gradient color, where c_white is default (or keyword 'previous' for no change, or keyword 'inherit' for saved style)
col3color/macroThe text bottom-right gradient color, where c_white is default (or keyword 'previous' for no change, or keyword 'inherit' for saved style)
col4color/macroThe text bottom-left gradient color, where c_white is default (or keyword 'previous' for no change, or keyword 'inherit' for saved style)
shadowcolor/macroThe text shadow color, where 'none' is default (or keyword 'previous' for no change, keyword 'inherit' for saved style, or 'none' for none)
outlinecolor/macroThe text outline color, where 'none' is default (or keyword 'previous' for no change, keyword 'inherit' for saved style, or 'none' for none)

Description#

Processes text stylization, including support for style inheritance, and returns the results as a ds_map.

note

!Important note: The resulting ds_map is temporary and must be destroyed outside this script when finished to prevent memory leaks!

As this script is run automatically by any text scripts supporting style inheritance, it is never necessary to run sys_text_style_init manually.