Back to Home

ESO Lua File v101032

pregameandingame/gamepad/controllerdisconnect/controllerdisconnect.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    CONTROLLER_DISCONNECT_FRAGMENT = ZO_FadeSceneFragment:New(control)
    local headerData =
    {
        titleTextAlignment = TEXT_ALIGN_CENTER,
        titleText = GetString(SI_GAMEPAD_DISCONNECTED_TITLE),
    }
    local header = control:GetNamedChild("HeaderContainer").header
    local interactKeybindControl = control:GetNamedChild("InteractKeybind")
    ZO_KeybindButtonTemplate_Setup(interactKeybindControl, "DIALOG_PRIMARY", ZO_ControllerDisconnect_DismissPopup, GetString(SI_GAMEPAD_DISCONNECTED_CONTINUE_TEXT))
end
    local name = GetOnlineIdForActiveProfile()
    if name == "" then
        --There is no currently active profile, do not show the controller disconnected message.
        return
    end
    local message
    if ZO_IsPlaystationPlatform() then
        message = GetString(SI_GAMEPAD_DISCONNECTED_PLAYSTATION_TEXT)
    else
        message = GetString(SI_GAMEPAD_DISCONNECTED_XBOX_TEXT)
    end
    message = zo_strformat(message, name)
    local mainText = ZO_ControllerDisconnect:GetNamedChild("ContainerScrollChildMainText")
    mainText:SetText(message)
    mainText:SetHorizontalAlignment(TEXT_ALIGN_CENTER)
    ZO_ControllerDisconnect:SetHidden(false)
end
    ZO_ControllerDisconnect:SetHidden(true)
end