Back to Home

ESO Lua File v100032

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
81
82
83
84
85
86
87
88
89
90
91
--Keep Upgrade Window
ZO_WORLD_MAP_KEEP_UPGRADE_KEYBOARD_BUTTON_SIZE = 40
local SYMBOL_PARAMS = {
    GRID_DEFAULT_SPACING_Y = 0,
    SYMBOL_PADDING_Y = 15,
    SYMBOL_ICON_SIZE = ZO_WORLD_MAP_KEEP_UPGRADE_KEYBOARD_BUTTON_SIZE,
}
local MapKeepUpgrade = ZO_MapKeepUpgrade_Shared:Subclass()
function MapKeepUpgrade:New(...)
    return ZO_MapKeepUpgrade_Shared.New(self, ...)
end
function MapKeepUpgrade:Initialize(control)
    self.symbolParams = SYMBOL_PARAMS
    self.gridListClass = ZO_SingleTemplateGridScrollList_Keyboard
    self.labelLayout = "ZO_WorldMapKeepUpgradeHeader_Keyboard"
    self.buttonLayout = "ZO_WorldMapKeepUpgradeButton_Keyboard"
    ZO_MapKeepUpgrade_Shared.Initialize(self, control)
end
function MapKeepUpgrade:RefreshData()
    self.keepUpgradeObject = WORLD_MAP_KEEP_INFO:GetKeepUpgradeObject()
end
function MapKeepUpgrade:Button_OnMouseEnter(control)
    InitializeTooltip(KeepUpgradeTooltip, control, TOPLEFT, 5, 0)
    local data = control.dataEntry.data:GetDataSource()
    self.keepUpgradeObject:SetUpgradeTooltip(data.level, data.index)
end
function MapKeepUpgrade:Button_OnMouseExit(button)
    ClearTooltip(KeepUpgradeTooltip)
end
function MapKeepUpgrade:Time_OnMouseEnter(label)
    InitializeTooltip(InformationTooltip, label, TOPLEFT, 10, 0)
    self.keepUpgradeObject:SetRateTooltip()
end
function MapKeepUpgrade:Time_OnMouseExit(label)
    ClearTooltip(InformationTooltip)
end
function ZO_MapKeepUpgrade_Shared:Bar_OnMouseEnter(bar)
    if not self.timeContainer:IsHidden() then
        self:Time_OnMouseEnter(self.timeContainer)
    end
end
function ZO_MapKeepUpgrade_Shared:Bar_OnMouseExit(bar)
    self:Time_OnMouseExit(self.timeContainer)
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