GetStringUIDimensions

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

The function takes a string, a font ID (equivalent to XML <font>), and a horizontal wrap-width (equivalent to XML <wrapwidth>), and outputs into the 3 specified Script Variables the string's simulated UI dimensions (width, height and number of lines) were it to be assigned to a Text-type UI tile.

Syntax

[help]
GetStringUIDimensions text:string fontID:int wrapWidth:float resWidth:ScriptVar resHeight:ScriptVar resNumLines:ScriptVar

Example

GetStringUIDimensions "Everything is theoretically impossible, until it is done" 3 80 fWidth fHeight iNumLines