Ui::setLoadingPromptTextEntry: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
These are some localized strings used in the loading spinner.<br>'PM_WAIT'                  = Please Wait<br>'CELEB_WPLYRS'              = Waiting For Players.<br>'CELL_SPINNER2'            = Scanning storage.<br>'ERROR_CHECKYACHTNAME' = Registering your yacht's name. Please wait.<br>'ERROR_CHECKPROFANITY'  = Checking your text for profanity. Please wait.<br>'FM_COR_AUTOD'                        = Just spinner no text<br>'FM_IHELP_WAT2'                        = Waiting for other players<br>'FM_JIP_WAITO'                            = Game options are being set<br>'FMMC_DOWNLOAD'                    = Downloading<br>'FMMC_PLYLOAD'                        = Loading<br>'FMMC_STARTTRAN'                    = Launching session<br>'HUD_QUITTING'                          =  Quiting session<br>'KILL_STRIP_IDM'                        = Waiting for to accept<br>'MP_SPINLOADING'                      = Loading
These are some localized strings used in the loading spinner.<br>'PM_WAIT'                  = Please Wait<br>'CELEB_WPLYRS'              = Waiting For Players.<br>'CELL_SPINNER2'            = Scanning storage.<br>'ERROR_CHECKYACHTNAME' = Registering your yacht's name. Please wait.<br>'ERROR_CHECKPROFANITY'  = Checking your text for profanity. Please wait.<br>'FM_COR_AUTOD'                        = Just spinner no text<br>'FM_IHELP_WAT2'                        = Waiting for other players<br>'FM_JIP_WAITO'                            = Game options are being set<br>'FMMC_DOWNLOAD'                    = Downloading<br>'FMMC_PLYLOAD'                        = Loading<br>'FMMC_STARTTRAN'                    = Launching session<br>'HUD_QUITTING'                          =  Quiting session<br>'KILL_STRIP_IDM'                        = Waiting for to accept<br>'MP_SPINLOADING'                      = Loading
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.ui.setLoadingPromptTextEntry(string);</syntaxhighlight>
<pre>mp.game.ui.setLoadingPromptTextEntry(string);</pre>
=== Required Arguments ===
=== Required Arguments ===
*'''string:''' String
*'''string:''' String
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<pre>
function startLoadingMessage (text) {
function startLoadingMessage (text) {
     mp.game.ui.setLoadingPromptTextEntry("STRING");
     mp.game.ui.setLoadingPromptTextEntry("STRING");
Line 22: Line 23:
     startLoadingMessage ("Hello world");
     startLoadingMessage ("Hello world");
})
})
</syntaxhighlight>
</pre>
 
==See also==
==See also==
{{Ui_s_function_c}}
{{Ui_s_function_c}}

Latest revision as of 17:46, 16 August 2018

Initializes the text entry for the the text next to a loading prompt. All natives for for building UI texts can be used here
These are some localized strings used in the loading spinner.
'PM_WAIT' = Please Wait
'CELEB_WPLYRS' = Waiting For Players.
'CELL_SPINNER2' = Scanning storage.
'ERROR_CHECKYACHTNAME' = Registering your yacht's name. Please wait.
'ERROR_CHECKPROFANITY' = Checking your text for profanity. Please wait.
'FM_COR_AUTOD' = Just spinner no text
'FM_IHELP_WAT2' = Waiting for other players
'FM_JIP_WAITO' = Game options are being set
'FMMC_DOWNLOAD' = Downloading
'FMMC_PLYLOAD' = Loading
'FMMC_STARTTRAN' = Launching session
'HUD_QUITTING' = Quiting session
'KILL_STRIP_IDM' = Waiting for to accept
'MP_SPINLOADING' = Loading

Syntax

mp.game.ui.setLoadingPromptTextEntry(string);

Required Arguments

  • string: String

Return value

  • Undefined

Example

function startLoadingMessage (text) {
    mp.game.ui.setLoadingPromptTextEntry("STRING");
    mp.game.ui.addTextComponentSubstringPlayerName(text);
    mp.game.ui.showLoadingPrompt(1);

    setTimeout(() => {
        mp.game.invoke('0x10D373323E5B9C0D'); //stop after 15s
    }, 15000)
}

mp.events.add('render', () => {
    startLoadingMessage ("Hello world");
})

See also