Back to Home

ESO Lua File v100035

libraries/zo_tile/keyboard/tile_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
----
-- ZO_Tile_Keyboard
----
-----------
-- This class should be dual inherited after ZO_Tile to create a complete tile. This class should NOT subclass ZO_Tile
--
-- Note: Since this is expected to be the second class of a dual inheritance it does not have it's own New function
-----------
ZO_Tile_Keyboard = ZO_Object:Subclass()
function ZO_Tile_Keyboard:InitializePlatform()
    local control = self:GetControl()
    self.isMousedOver = false
    control:SetHandler("OnMouseEnter", function(...) self:OnMouseEnter(...) end)
    control:SetHandler("OnMouseExit", function(...) self:OnMouseExit(...) end)
    control:SetHandler("OnMouseUp", function(_, ...) self:OnMouseUp(...) end)
end
function ZO_Tile_Keyboard:PostInitializePlatform()
    -- To be overridden
end
function ZO_Tile_Keyboard:OnMouseEnter()
    self.isMousedOver = true
end
function ZO_Tile_Keyboard:OnMouseExit()
    self.isMousedOver = false
end
function ZO_Tile_Keyboard:IsMousedOver()
    return self.isMousedOver
end
function ZO_Tile_Keyboard:OnMouseUp(button, upInside)
    -- Can be overridden
end