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.
is_enabled(node) Check if node is enabled in gui hierarchy.
get_pivot_offset(pivot) Get node offset for given gui pivot


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)
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_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
generated by LDoc 1.4.6 Last updated 2020-02-23 22:54:59