pregame/charactercreate/gamepad/zo_charactercreate_gamepad.lua:149 -- ZO_CharacterNaming_Gamepad_CreateDialog(self.control,
{
errorControl = ZO_CharacterCreate_GamepadFinishError,
errorFragment = CHARACTER_CREATE_GAMEPAD_FINISH_ERROR_FRAGMENT,
dialogName = CHARACTER_CREATE_GAMEPAD_DIALOG,
dialogTitle = SI_CREATE_CHARACTER_GAMEPAD_FINISH_TITLE,
dialogMainText = "",
onBack = function()
if self.focusControl then
self.focusControl:EnableFocus(true)
end
end,
onFinish = function(dialog)
-- In the normal flow we expect the focusControl to be re-enabled by another dialog
-- or that we create the character and log in removing the need.
-- However if the console name validation request times out there is no flow where the
-- control is re-focused. So refocus here just in case and any dialog that does show will
-- eat the left stick input so we shouldn't have any issues there.
if self.focusControl then
self.focusControl:EnableFocus(true)
end
local characterName = dialog.selectedName
self.characterName = characterName
if characterName and #characterName > 0 then
if IsConsoleUI() then
PLAYER_CONSOLE_INFO_REQUEST_MANAGER:RequestNameValidation(characterName, CharacterNameValidationCallback)
else
CharacterNameValidationCallback(IsValidName(characterName))
end
end
end,
})
pregame/characterselect/gamepad/zo_characterselect_gamepad.lua:1279 -- ZO_CharacterNaming_Gamepad_CreateDialog(ZO_CharacterSelect_Gamepad,
{
errorControl = ZO_CharacterSelect_GamepadRenameError,
errorFragment = CHARACTER_SELECT_RENAME_ERROR_GAMEPAD_FRAGMENT,
dialogName = "CHARACTER_SELECT_RENAME_CHARACTER_GAMEPAD",
dialogTitle = function(dialog)
local titleText = SI_CHARACTER_SELECT_RENAME_CHARACTER_TITLE
if dialog and dialog.data and dialog.data.renameFromToken then
titleText = SI_CHARACTER_SELECT_RENAME_CHARACTER_FROM_TOKEN_TITLE
end
return GetString(titleText)
end,
dialogMainText = function(dialog)
local mainText = ""
if dialog.data and dialog.data.originalCharacterName then
mainText = zo_strformat(SI_RENAME_CHARACTER_NAME_LABEL, dialog.data.originalCharacterName)
end
return mainText
end,
onBack = function()
-- viewport was never deactivated, so don't reactivate
local DONT_ACTIVATE_VIEWPORT = false
ZO_CharacterSelect_Gamepad_ReturnToCharacterList(DONT_ACTIVATE_VIEWPORT)
end,
onFinish = function(dialog)
g_requestedRename = dialog.selectedName
if g_requestedRename and g_requestedRename ~= "" then
local selectedCharacterData = CHARACTER_SELECT_MANAGER:GetSelectedCharacterData()
CHARACTER_SELECT_MANAGER:AttemptCharacterRename(selectedCharacterData.id, g_requestedRename, OnRenameResult)
end
end,
createHeaderDataFunction = function(dialog, data)
local headerData = {}
if data then
if data.renameFromToken then
headerData.data1 =
{
value = GetNumServiceTokens(SERVICE_TOKEN_NAME_CHANGE),
header = GetString(SI_SERVICE_TOKEN_COUNT_TOKENS_HEADER),
}
end
end
return headerData
end,
})