Ui::setTextEntryForWidth: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
Line 13: Line 13:
{{Ui_s_function_c}}
{{Ui_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:UI API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 14:52, 20 May 2017

Used for setting text entry and then getting the text width via _GET_TEXT_SCREEN_WIDTH.

Example:
_SET_TEXT_ENTRY_FOR_WIDTH('NUMBER');
ADD_TEXT_COMPONENT_FLOAT(69.420f, 2);
FLOAT width = _GET_TEXT_SCREEN_WIDTH(1);

// YOU CANNOT DRAW TEXT WITH THIS. USE _SET_TEXT_ENTRY FOR THAT

Syntax

mp.game.ui.setTextEntryForWidth(text);

Required Arguments

  • text: String

Return value

  • Undefined

Example

// todo

See also