VN_fnc_UI_checkFontSize

From Savage Game Design Wiki
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Dscha
Argument(s): n/a
Effect(s): unknown

Description

-decreasing fontsize (sizeEx) for 1-line TextCtrls, to fit in the width of the given ctrl.
-updates the ctrl at the end automaticaly (minimum: 0.02)

Syntax

Syntax
[_ctrl,_text,_fontSize,_font] call VN_fnc_UI_checkFontSize;
Parameters
_ctrl: Control - Control
_text: String - Text
_fontSize: Number - (Optional, default 0.12) sizeEx to start with
_font: String - (Optional, default USEDFONT) Font to use
Return value
Nothing

Examples

Example 1
- [_RscTextCtrl, "I am a long text wich probably doesn't fit in a tiny control"] call vn_fnc_checkFontSize; - [_RscTextCtrl, "I am a long text wich probably doesn't fit in a tiny control", 0.5, "RobotoCondensed"] call vn_fnc_checkFontSize;