Difference between revisions of "VN fnc UI checkFontSize"

From Savage Game Design Wiki
Jump to navigation Jump to search
(Created page with "{{Function |v= 1.00 |author=Dscha |a= |e= |g1= mainFunctions |d= <pre>-decreasing fontsize (sizeEx) for 1-line TextCtrls, to fit in the width of the given ctrl. -updates t...")
 
 
Line 12: Line 12:
 
-updates the ctrl at the end automaticaly (minimum: 0.02)</pre>
 
-updates the ctrl at the end automaticaly (minimum: 0.02)</pre>
  
|s= [] call [[VN_fnc_UI_checkFontSize]];
+
|s= [_ctrl,_text,_fontSize,_font] call [[VN_fnc_UI_checkFontSize]];
  
 
|p1n=_ctrl
 
|p1n=_ctrl

Latest revision as of 21:02, 4 May 2022

← 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;