Back to Home

ESO Lua File v100033

ingame/map/keyboard/worldmapcorner_keyboard.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
local g_nextUpdate = nil
local function UpdateTitle(titleLabel)
    titleLabel:SetText(ZO_WorldMap_GetMapTitle())
end
    local titleLabel = self:GetNamedChild("Title")
    local function UpdateTitleEventCallback()
        UpdateTitle(titleLabel)
    end
    CALLBACK_MANAGER:RegisterCallback("OnWorldMapChanged", UpdateTitleEventCallback)
    CALLBACK_MANAGER:RegisterCallback("OnWorldMapCampaignChanged", UpdateTitleEventCallback)
    self:RegisterForEvent(EVENT_PLAYER_ACTIVATED, UpdateTitleEventCallback)
    UpdateTitle(titleLabel)
end
    if(g_nextUpdate == nil or time > g_nextUpdate) then
        local formattedTime, nextUpdateIn = ZO_FormatClockTime()
        self:GetNamedChild("Time"):SetText(formattedTime)
        g_nextUpdate = time + nextUpdateIn
    end
end