Back to Home

ESO Lua File v100035

publicallingames/tile/keyboard/dailyrewardstile_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
----
-- ZO_DailyRewardsTile_Keyboard
----
ZO_DAILY_REWARDS_TILE_KEYBOARD_DEFAULT_HIGHLIGHT_ANIMATION_PROVIDER = ZO_ReversibleAnimationProvider:New("ShowOnMouseOverLabelAnimation")
-- Primary logic class must be subclassed after the platform class so that platform specific functions will have priority over the logic class functionality
ZO_DailyRewardsTile_Keyboard = ZO_Object.MultiSubclass(ZO_ClaimTile_Keyboard, ZO_DailyRewardsTile)
function ZO_DailyRewardsTile_Keyboard:New(...)
    return ZO_DailyRewardsTile.New(self, ...)
end
-- Begin ZO_ActionTile_Keyboard Overrides --
function ZO_DailyRewardsTile_Keyboard:PostInitializePlatform()
    ZO_ClaimTile_Keyboard.PostInitializePlatform(self)
    self:SetHighlightAnimationProvider(ZO_DAILY_REWARDS_TILE_KEYBOARD_DEFAULT_HIGHLIGHT_ANIMATION_PROVIDER)
    local function OnActionButtonMouseEnter()
        self:OnMouseEnter()
    end
    local function OnActionButtonMouseExit()
        self:OnMouseExit()
    end
    self.actionButton:SetHandler("OnMouseEnter", OnActionButtonMouseEnter)
    self.actionButton:SetHandler("OnMouseExit", OnActionButtonMouseExit)
end
function ZO_DailyRewardsTile_Keyboard:OnMouseEnter()
    ZO_ActionTile_Keyboard.OnMouseEnter(self)
    self.isMousedOver = true
    self.actionButton:SetShowingHighlight(self.isMousedOver)
end
function ZO_DailyRewardsTile_Keyboard:OnMouseExit()
    ZO_ActionTile_Keyboard.OnMouseExit(self)
    self.isMousedOver = false
    self.actionButton:SetShowingHighlight(self.isMousedOver)
end
function ZO_DailyRewardsTile_Keyboard:OnMouseUp(button, upInside)
    if self.actionCallback and self:IsActionAvailable() then
        self.actionCallback()
    end
end
function ZO_DailyRewardsTile_Keyboard:ShouldUseSelectedHeaderColor()
    return true
end
-- End ZO_ActionTile_Keyboard Overrides --
-----
-- Global XML Functions
-----
    ZO_DailyRewardsTile_Keyboard:New(control)
end