Back to Home

ESO Lua File v100036

internalingame/zonestories/keyboard/zonestoriestile_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
----
-- ZO_ZoneStoriesTile_Keyboard
----
ZO_ZONE_STORIES_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_ZoneStoriesTile_Keyboard = ZO_Object.MultiSubclass(ZO_ActionTile_Keyboard, ZO_ZoneStoriesTile)
function ZO_ZoneStoriesTile_Keyboard:New(...)
    return ZO_ZoneStoriesTile.New(self, ...)
end
-- Begin ZO_ActionTile_Keyboard Overrides --
function ZO_ZoneStoriesTile_Keyboard:PostInitializePlatform()
    ZO_ActionTile_Keyboard.PostInitializePlatform(self)
    self:SetHeaderText(GetString(SI_ZONE_STORY_INFO_HEADER))
    self:SetActionText(GetString(SI_MARKET_ANNOUNCEMENT_ACTIVITY_FINDER_ACTION))
    self:SetHighlightAnimationProvider(ZO_ZONE_STORIES_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_ZoneStoriesTile_Keyboard:OnMouseEnter()
    ZO_ActionTile_Keyboard.OnMouseEnter(self)
    self.isMousedOver = true
    self.actionButton:SetShowingHighlight(self.isMousedOver)
end
function ZO_ZoneStoriesTile_Keyboard:OnMouseExit()
    ZO_ActionTile_Keyboard.OnMouseExit(self)
    self.isMousedOver = false
    self.actionButton:SetShowingHighlight(self.isMousedOver)
end
function ZO_ZoneStoriesTile_Keyboard:OnMouseUp(button, upInside)
    if self.actionCallback and self:IsActionAvailable() then
        self.actionCallback()
    end
end
-- Globals
    ZO_ZoneStoriesTile_Keyboard:New(control)
end