Little code refactor, update changelog

This commit is contained in:
Insality
2021-04-02 10:07:22 +03:00
parent 12dcdd970b
commit 0472e5d6db
4 changed files with 8 additions and 10 deletions

View File

@@ -27,8 +27,8 @@ function Hover.init(self, node, on_hover_callback)
self._is_hovered = false
self._is_mouse_hovered = false
self._is_enabled = true
self._is_mobile = helper.is_mobile()
self.on_hover = Event(on_hover_callback)
self.on_mouse_hover = Event()
@@ -41,7 +41,7 @@ function Hover.on_input(self, action_id, action)
end
-- Disable nil (it's mouse) hover or mobile platforms
if not action_id and helper.is_mobile() then
if self._is_mobile and not action_id then
return false
end