Back to Home

ESO Lua File v100021

ingame/map/keyboard/worldmapkeepupgrade_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
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--Keep Upgrade Window
local SYMBOL_PARAMS = {
    FIRST_SECTION_OFFSET_X = 39,
    FIRST_SECTION_OFFSET_Y = 10,
    SYMBOL_PADDING_X = 0,
    SYMBOL_PADDING_Y = 5,
    SYMBOL_SECTION_OFFSET_X = 0,
    SYMBOL_SECTION_OFFSET_Y = 20,
}
local MapKeepUpgrade = ZO_MapKeepUpgrade_Shared:Subclass()
function MapKeepUpgrade:New(...)
    local object = ZO_MapKeepUpgrade_Shared.New(self, ...)
    return object
end
function MapKeepUpgrade:Initialize(control)
    self.symbolParams = SYMBOL_PARAMS
    self.levelLayout = "ZO_WorldMapKeepUpgradeLevel"
    self.buttonLayout = "ZO_WorldMapKeepUpgradeButton"
    ZO_MapKeepUpgrade_Shared.Initialize(self, control)
    self.fragment = ZO_FadeSceneFragment:New(control)
    self.fragment:RegisterCallback("StateChange", function(oldState, newState)
        if(newState == SCENE_FRAGMENT_SHOWN) then
            self:RefreshAll()
        elseif(newState == SCENE_FRAGMENT_HIDDEN) then
            self.keepUpgradeObject = nil
        end
    end)
end
function MapKeepUpgrade:RefreshAll()
    self:RefreshData()
    self:RefreshLevels()
end
function MapKeepUpgrade:RefreshData()
    self.keepUpgradeObject = WORLD_MAP_KEEP_INFO:GetKeepUpgradeObject()
end
--Global XML
    WORLD_MAP_KEEP_UPGRADE:Button_OnMouseEnter(button)
end
    WORLD_MAP_KEEP_UPGRADE:Button_OnMouseExit(button)
end
    WORLD_MAP_KEEP_UPGRADE:Time_OnMouseEnter(self)
end
    WORLD_MAP_KEEP_UPGRADE:Time_OnMouseExit(self)
end
    WORLD_MAP_KEEP_UPGRADE:Bar_OnMouseEnter(self)
end
    WORLD_MAP_KEEP_UPGRADE:Bar_OnMouseExit(self)
end
--Globals
    WORLD_MAP_KEEP_UPGRADE = MapKeepUpgrade:New(self)
    WORLD_MAP_KEEP_INFO:SetFragment("UPGRADE_FRAGMENT", WORLD_MAP_KEEP_UPGRADE:GetFragment())
end