From 8231e303101d7ebe18d072bb15a92dd0b2542aea Mon Sep 17 00:00:00 2001 From: Insality Date: Tue, 19 May 2020 23:54:15 +0300 Subject: [PATCH] #64 Fix default mouse_hover state --- docs_md/01-components.md | 1 + docs_md/changelog.md | 5 +++++ druid/base/hover.lua | 1 + 3 files changed, 7 insertions(+) diff --git a/docs_md/01-components.md b/docs_md/01-components.md index 9b3ee6e..e24a182 100644 --- a/docs_md/01-components.md +++ b/docs_md/01-components.md @@ -263,6 +263,7 @@ Create hover component with druid: `hover = druid:new_hover(node, callback)` ### Notes - By default, hover handles _hover event_ with pressed touch action_id. So it's mean, what mouse or touch have to be pressed - On desktop platforms there is _on_mouse_hover_ event. It's event on mouse hover without any action id +- By default, assume what node is on not hovered state (both _hover_ and _mouse_hover_) ## Swipe diff --git a/docs_md/changelog.md b/docs_md/changelog.md index 58470f9..b78563d 100644 --- a/docs_md/changelog.md +++ b/docs_md/changelog.md @@ -91,3 +91,8 @@ Druid 0.4.0: - **Fix:** Blocker component bug (blocker had very high priority, so it's block even button components, created after blocker) - **Fix #58:** Bug, when druid instance should be always named `druid` (ex: `self.druid = druid.new(self)`) - **Fix #53:** Bug with final _Druid instance_ without any components + + +Druid 0.5.0: +- **Fix #61:** Button component: fix button animation node creation +- **Fix #64:** Hover component: wrong mouse_hover default state diff --git a/druid/base/hover.lua b/druid/base/hover.lua index de05daf..e4c9b8d 100644 --- a/druid/base/hover.lua +++ b/druid/base/hover.lua @@ -22,6 +22,7 @@ function M.init(self, node, on_hover_callback) self.node = self:get_node(node) self._is_hovered = false + self._is_mouse_hovered = false self.on_hover = Event(on_hover_callback) self.on_mouse_hover = Event()