Module Hover

Component to handle hover node interaction

Functions

init(self, node, on_hover_callback, on_mouse_hover) The Hover constructor
is_enabled(self) Return current hover enabled state
is_hovered(self) Return current hover state.
is_mouse_hovered(self) Return current hover state.
set_click_zone(self, zone) Strict hover click area.
set_enabled(self, state) Set enable state of hover component.
set_hover(self, state) Set hover state
set_mouse_hover(self, state) Set mouse hover state

Tables

style Component style params.

Fields

node Hover node
on_hover On hover callback(self, state, hover_instance)
on_mouse_hover On mouse hover callback(self, state, hover_instance)


Functions

init(self, node, on_hover_callback, on_mouse_hover)
The Hover constructor

Parameters:

  • self Hover Hover
  • node node Gui node
  • on_hover_callback function Hover callback
  • on_mouse_hover function On mouse hover callback
is_enabled(self)
Return current hover enabled state

Parameters:

Returns:

    boolean The hover enabled state
is_hovered(self)
Return current hover state. True if touch action was on the node at current time

Parameters:

Returns:

    boolean The current hovered state
is_mouse_hovered(self)
Return current hover state. True if nil action_id (usually desktop mouse) was on the node at current time

Parameters:

Returns:

    boolean The current hovered state
set_click_zone(self, zone)
Strict hover click area. Useful for no click events outside stencil node

Parameters:

set_enabled(self, state)
Set enable state of hover component. If hover is not enabled, it will not generate any hover events

Parameters:

  • self Hover Hover
  • state boolean or nil The hover enabled state
set_hover(self, state)
Set hover state

Parameters:

  • self Hover Hover
  • state boolean or nil The hover state
set_mouse_hover(self, state)
Set mouse hover state

Parameters:

  • self Hover Hover
  • state boolean or nil The mouse hover state

Tables

style
Component style params. You can override this component styles params in druid styles table or create your own style

Fields:

  • ON_HOVER_CURSOR string Mouse hover style on node hover (optional)
  • ON_MOUSE_HOVER_CURSOR string Mouse hover style on node mouse hover (optional)

Fields

node
Hover node
on_hover
On hover callback(self, state, hover_instance)
on_mouse_hover
On mouse hover callback(self, state, hover_instance)
generated by LDoc TESTING Last updated 2015-01-01 12:00:00