Small optimization && refactoring

This commit is contained in:
Insality
2023-07-15 15:56:06 +03:00
parent 337090e74c
commit 556e1a9bae
11 changed files with 33 additions and 46 deletions

View File

@@ -64,11 +64,7 @@ function Hover.on_input(self, action_id, action)
return false
end
local is_pick = gui.pick_node(self.node, action.x, action.y)
if self.click_zone then
is_pick = is_pick and gui.pick_node(self.click_zone, action.x, action.y)
end
local is_pick = helper.pick_node(self.node, action.x, action.y, self.click_zone)
local hover_function = action_id and self.set_hover or self.set_mouse_hover
if not is_pick then