# Module `druid.helper`

Text node or icon node can be nil

## Functions

centrate_text_with_icon([text_node][, icon_node], margin) | Center two nodes.
centrate_icon_with_text([icon_node[, text_node[, margin=0]]]) | Center two nodes.
centrate_nodes([margin=0[, ...]]) | Center several nodes nodes.
is_enabled(node) | Check if node is enabled in gui hierarchy.
get_closest_stencil_node(node) | Return closest non inverted clipping parent node for node
get_pivot_offset(pivot) | Get node offset for given gui pivot
helper..is_mobile() | Check if device is mobile (Android or iOS)
is_web() | Check if device is HTML5
get_border(node, offset) | Distance from node position to his borders
deprecated(message) | Show deprecated message.

## Functions

centrate_text_with_icon([text_node][, icon_node], margin)
  Center two nodes. Nodes will be center around 0 x position text_node will be first (at left side)

  ### Parameters:

  - text_node text Gui text node (optional)
  - icon_node box Gui box node (optional)
  - margin number Offset between nodes
centrate_icon_with_text([icon_node[, text_node[, margin=0]]])
  Center two nodes. Nodes will be center around 0 x position icon_node will be first (at left side)

  ### Parameters:

  - icon_node box Gui box node (optional)
  - text_node text Gui text node (optional)
  - margin number Offset between nodes (default 0)
centrate_nodes([margin=0[, ...]])
  Center several nodes nodes. Nodes will be center around 0 x position

  ### Parameters:

  - margin number Offset between nodes (default 0)
  - ... Node Any count of gui Node (optional)
is_enabled(node)
  Check if node is enabled in gui hierarchy. Return false, if node or any his parent is disabled

  ### Parameters:

  - node node Gui node

  ### Returns:

  bool Is enabled in hierarchy
get_closest_stencil_node(node)
  Return closest non inverted clipping parent node for node

  ### Parameters:

  - node node Gui node

  ### Returns:

  node or nil The clipping node
get_pivot_offset(pivot)
  Get node offset for given gui pivot

  ### Parameters:

  - pivot gui.pivot The node pivot

  ### Returns:

  vector3 Vector offset with [-1..1] values
helper..is_mobile()
  Check if device is mobile (Android or iOS)
is_web()
  Check if device is HTML5
get_border(node, offset)
  Distance from node position to his borders

  ### Parameters:

  - node node The gui node to check
  - offset vector3 The offset to add to result

  ### Returns:

  vector4 Vector with distance to node border: (left, top, right, down)
deprecated(message)
  Show deprecated message. Once time per message

  ### Parameters:

  - message string The deprecated message

generated by LDoc 1.4.6 Last updated 2022-02-12 17:16:44