Skip to content

paradox_react_util

Source: base/tealdef/gui/menu/paradox_react_util.d.tl

Notes

Paradox account recipes and texts (login, account creation, account linking, profile name), loaded with ug_require "/gui/menu/paradox_react_util.tl".

ParadoxReactUtil

record global base/tealdef/gui/menu/paradox_react_util.d.tl:3

global record ParadoxReactUtil

Load: local paradox_react_util = ug_require "::/gui/menu/paradox_react_util.tl" as ParadoxReactUtil

Notes

Recipes and helper texts for the Paradox account.

Fields

Name Type Description
DatePicker Recipe<DatePickerParams> Three combo boxes for year (current year down to 1900), month and day, used for the date of birth.In game Year · Month · Day
PdxAccountLogin Recipe<PdxAccountLoginParams> Paradox account login form. Handles automatic login for linked platform accounts, account linking and creation of a missing profile.In game Paradox Account · Username or Email · Create New Account used 1× in the base game
PdxAccountName Recipe0 Paradox icon with the profile name of the logged-in account, or its email address if no profile exists. used 1× in the base game
PdxLinkButton Recipe<PdxLinkButtonParams> Button to link or unlink the platform account and the Paradox account. Shows nothing if the platform does not support account linking.In game Link Account · Unlink Account · Paradox Account: {email} used 1× in the base game
PdxRenameProfileButton Recipe<PdxRenameProfileButtonParams> "Rename Profile" button that opens the profile rename window. Shows nothing if no account is logged in.In game Rename Profile

Functions

getLinkText(linkState : PdxThirdPartyLinkState) : string base/tealdef/gui/menu/paradox_react_util.d.tl:32

Call as paradox_react_util.getLinkText(…)

Notes

Returns the translated explanation or question for an account link state, worded for the current platform (Steam, PlayStation Network, Xbox network or generic).

In game Paradox Interactive will link your platform account to allow you to get automatically logged in to your Paradox Account when starting the game. Should you no longer wish to use this feature, go to the settings screen and unlink. · This Paradox Account is already linked to a different platform account. Would you like to overwrite the link? · The currently logged in Paradox Account and the platform account are linked. Do you want to unlink?

Returns string: The text, or nil for other states.

getAutoLoginPromptStateText() : string base/tealdef/gui/menu/paradox_react_util.d.tl:34

Call as paradox_react_util.getAutoLoginPromptStateText(…)

Notes

Returns the translated question whether to log in automatically with the linked platform account.

In game Your platform account is linked to a Paradox Account. Do you wish to automatically log in to your Paradox Account?

Returns string

getErrorMessageAndField(err : PdxErrorCodes) : string, string base/tealdef/gui/menu/paradox_react_util.d.tl:36

Call as paradox_react_util.getErrorMessageAndField(…)

Notes

Translates a Paradox backend error code into a message.

In game The email address you entered is invalid. Please check your input and try again. · The password you entered is invalid. Please check your input and try again. · The profile name you entered is already taken. Please choose a different name.

Returns string, string: The message and the name of the affected form field ("email", "password", "dateOfBirth", "profileName"), or nil as field for general errors.

ParadoxReactUtil.DatePickerParams

record base/tealdef/gui/menu/paradox_react_util.d.tl:4

record DatePickerParams

Notes

Parameters of DatePicker.

Used in the base game: 1 time in 1 file

base/content/gui/gui/menu/paradox_react_util.tl:113

paradox_react_util.DatePicker = react.RegisterRecipe("DatePicker", function(params : ParadoxReactUtil.DatePickerParams) : TreeNodeId

Fields

Name Type Description
value string Initial date as YYYY-MM-DD.

Functions

onValueChange(string) base/tealdef/gui/menu/paradox_react_util.d.tl:6

Notes

Called with the date as YYYY-MM-DD whenever a part changes, or with "" while year, month or day is not chosen.

ParadoxReactUtil.PdxAccountLoginParams

record base/tealdef/gui/menu/paradox_react_util.d.tl:10

record PdxAccountLoginParams

Notes

Parameters of PdxAccountLogin.

Used in the base game: 2 times in 1 file

base/content/gui/gui/menu/paradox_react_util.tl:336

local PdxCreateAccount = react.RegisterRecipe("PdxCreateAccount", function(params : ParadoxReactUtil.PdxAccountLoginParams) : TreeNodeId

Fields

Name Type Description
wc ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> Window container used to open the account creation window.

Functions

onProceed() base/tealdef/gui/menu/paradox_react_util.d.tl:11

Notes

Called when login (and profile creation, if needed) has finished successfully.

onStart() base/tealdef/gui/menu/paradox_react_util.d.tl:12

Notes

Called when a login process starts.

onAbort() base/tealdef/gui/menu/paradox_react_util.d.tl:13

Notes

Called when the player aborts the login.

ParadoxReactUtil.PdxLinkButtonParams

record base/tealdef/gui/menu/paradox_react_util.d.tl:20

record PdxLinkButtonParams

Notes

Parameters of PdxLinkButton.

Used in the base game: 1 time in 1 file

base/content/gui/gui/menu/paradox_react_util.tl:1450

paradox_react_util.PdxLinkButton = react.RegisterRecipe("PdxLinkButton", function(params : ParadoxReactUtil.PdxLinkButtonParams) : TreeNodeId

Fields

Name Type Description
wc ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> Window container used to open the account linking window.

ParadoxReactUtil.PdxRenameProfileButtonParams

record base/tealdef/gui/menu/paradox_react_util.d.tl:25

record PdxRenameProfileButtonParams

Notes

Parameters of PdxRenameProfileButton.

Used in the base game: 1 time in 1 file

base/content/gui/gui/menu/paradox_react_util.tl:1674

paradox_react_util.PdxRenameProfileButton = react.RegisterRecipe("PdxRenameProfileButton", function(params : ParadoxReactUtil.PdxRenameProfileButtonParams) : Tr

Fields

Name Type Description
wc ReactRefWrapApiT<Builtin.WindowContainerDelegateParam, Builtin.WindowAPI> Window container used to open the rename window.

Functions

onStart() base/tealdef/gui/menu/paradox_react_util.d.tl:27

Notes

Called when the rename window is opened.

onEnd() base/tealdef/gui/menu/paradox_react_util.d.tl:28

Notes

Called when the rename window is closed.