Back to Home

ESO Lua File v101038

pregame/globals/overflowdialog.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
43
44
45
46
47
48
49
50
51
52
53
local function SetupMainText(dialog, data)
    --ZO_OverflowDialogModalUnderlay:SetHidden(true)
    GetControl(dialog, "MainText"):SetText(zo_strformat(SI_OVERFLOW_DIALOG_TEXT, ZO_FormatTimeMilliseconds(data.waitTime, TIME_FORMAT_STYLE_DESCRIPTIVE)))
end
local function OverflowDialogInitialize(dialogControl)
    ZO_Dialogs_RegisterCustomDialog("PROVIDE_OVERFLOW_RESPONSE",
    {
        customControl = dialogControl,
        setup = SetupMainText,
        mustChoose = true,
        title =
        {
            text = SI_OVERFLOW_DIALOG_TITLE,
        },
        buttons =
        {
            {
                control = GetControl(dialogControl, "Cancel"),
                text = SI_OVERFLOW_DIALOG_CANCEL_BUTTON,
                keybind = false,
                callback =  function(dialog)
                                CancelLogin()
                                PregameStateManager_SetState("AccountLogin")
                            end,
            },
            {
                control = GetControl(dialogControl, "Overflow"),
                text = SI_OVERFLOW_DIALOG_OVERFLOW_BUTTON,
                keybind = false,
                callback =  function(dialog)
                                RespondToOverflowPrompt(true)
                                PregameStateManager_ShowLoginRequested()
                            end,
            },
            {
                control = GetControl(dialogControl, "Queue"),
                text = SI_OVERFLOW_DIALOG_QUEUE_BUTTON,
                keybind = false,
                callback =  function(dialog)
                                RespondToOverflowPrompt(false)
                                PregameStateManager_ShowLoginRequested()
                            end,
            },
        }                                   
    })
end
end