Ui::addTextComponentSubstringLocalized: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Takes a Hash of an input (example : INPUT_FRONTEND_RIGHT) and displays it's name it when you display your notification above the map.<br><br>^^ I don't know how somebody figured it prints the name of the input, when this native is clearly used for displaying Street Names in the scripts. Can you give an example if it actually does print out the INPUTS?<br><br><br>MulleDK19: It does neither. It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY('ES_HELP'), adds 'Continue'. I've renamed it to _ADD_TEXT_COMPONENT_SUBSTRING_LOCALIZED to reflect this.<br><br>Zorg93: correct name found, just uses a text labels hash key
Takes a Hash of an input (example : INPUT_FRONTEND_RIGHT) and displays it's name it when you display your notification above the map.<br><br>^^ I don't know how somebody figured it prints the name of the input, when this native is clearly used for displaying Street Names in the scripts. Can you give an example if it actually does print out the INPUTS?<br><br><br>MulleDK19: It does neither. It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY('ES_HELP'), adds 'Continue'. I've renamed it to _ADD_TEXT_COMPONENT_SUBSTRING_LOCALIZED to reflect this.<br><br>Zorg93: correct name found, just uses a text labels hash key
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">ui.addTextComponentSubstringLocalized(gxtEntryHash);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.ui.addTextComponentSubstringLocalized(gxtEntryHash);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''gxtEntryHash:''' Model hash or name
*'''gxtEntryHash:''' Model hash or name
Line 8: Line 8:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Ui_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:49, 20 May 2017

Takes a Hash of an input (example : INPUT_FRONTEND_RIGHT) and displays it's name it when you display your notification above the map.

^^ I don't know how somebody figured it prints the name of the input, when this native is clearly used for displaying Street Names in the scripts. Can you give an example if it actually does print out the INPUTS?


MulleDK19: It does neither. It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY('ES_HELP'), adds 'Continue'. I've renamed it to _ADD_TEXT_COMPONENT_SUBSTRING_LOCALIZED to reflect this.

Zorg93: correct name found, just uses a text labels hash key

Syntax

mp.game.ui.addTextComponentSubstringLocalized(gxtEntryHash);

Required Arguments

  • gxtEntryHash: Model hash or name

Return value

  • Undefined

Example

// todo

See also