diff --git a/docs/index.html b/docs/index.html index 6e28364..193baec 100644 --- a/docs/index.html +++ b/docs/index.html @@ -45,10 +45,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -58,7 +56,7 @@
    -

    Documentation for Druid UI Library

    +

    Documentation for Druid Library

    Modules

    @@ -120,10 +118,6 @@ - - - - @@ -132,10 +126,6 @@ - - - - @@ -150,7 +140,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/component.html b/docs/modules/component.html index 97bca4d..5923cd0 100644 --- a/docs/modules/component.html +++ b/docs/modules/component.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -398,7 +396,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/const.html b/docs/modules/const.html index 67e8268..0b50a56 100644 --- a/docs/modules/const.html +++ b/docs/modules/const.html @@ -32,6 +32,7 @@

    Contents

    @@ -69,6 +70,13 @@

    +

    Tables

    +
    component Basic class for all Druid components.
    constDruid constants
    druid Druid UI Library.helper Text node or icon node can be nil
    helper.formatsDruid module with utils on string formats
    druid.progress_rich Component for rich progress component
    + + + + +
    pivots

    Fields

    @@ -81,6 +89,30 @@
    +

    Tables

    + +
    +
    + + pivots +
    +
    + + + +

    Fields:

    +
      +
    • test + test +
    • +
    + + + + + +
    +

    Fields

    @@ -105,7 +137,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:01:14
    diff --git a/docs/modules/druid.back_handler.html b/docs/modules/druid.back_handler.html index 851b443..c0b420f 100644 --- a/docs/modules/druid.back_handler.html +++ b/docs/modules/druid.back_handler.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -150,7 +148,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.blocker.html b/docs/modules/druid.blocker.html index 2eac1e0..e1924ab 100644 --- a/docs/modules/druid.blocker.html +++ b/docs/modules/druid.blocker.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -76,7 +74,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.button.html b/docs/modules/druid.button.html index 54a61db..7e0edbc 100644 --- a/docs/modules/druid.button.html +++ b/docs/modules/druid.button.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -190,7 +188,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.checkbox.html b/docs/modules/druid.checkbox.html index 4a55bba..51a2f75 100644 --- a/docs/modules/druid.checkbox.html +++ b/docs/modules/druid.checkbox.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -76,7 +74,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.checkbox_group.html b/docs/modules/druid.checkbox_group.html index b8824a0..0071b08 100644 --- a/docs/modules/druid.checkbox_group.html +++ b/docs/modules/druid.checkbox_group.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -76,7 +74,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.grid.html b/docs/modules/druid.grid.html index 3aeed3a..9321a7f 100644 --- a/docs/modules/druid.grid.html +++ b/docs/modules/druid.grid.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -77,7 +75,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.html b/docs/modules/druid.html index 51c19d0..18bfff8 100644 --- a/docs/modules/druid.html +++ b/docs/modules/druid.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -161,7 +159,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.locale.html b/docs/modules/druid.locale.html index 45da53f..cd07ef0 100644 --- a/docs/modules/druid.locale.html +++ b/docs/modules/druid.locale.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -117,7 +115,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.progress.html b/docs/modules/druid.progress.html index 5bb06b8..c133fb8 100644 --- a/docs/modules/druid.progress.html +++ b/docs/modules/druid.progress.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -295,7 +293,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.progress_rich.html b/docs/modules/druid.progress_rich.html index 2cce401..335a6b3 100644 --- a/docs/modules/druid.progress_rich.html +++ b/docs/modules/druid.progress_rich.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -175,7 +173,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.radio_group.html b/docs/modules/druid.radio_group.html index b1bb0e0..e4db277 100644 --- a/docs/modules/druid.radio_group.html +++ b/docs/modules/druid.radio_group.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -76,7 +74,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.scroll.html b/docs/modules/druid.scroll.html index 2836be1..c91a211 100644 --- a/docs/modules/druid.scroll.html +++ b/docs/modules/druid.scroll.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -275,7 +273,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.slider.html b/docs/modules/druid.slider.html index 427bc7a..4a71669 100644 --- a/docs/modules/druid.slider.html +++ b/docs/modules/druid.slider.html @@ -48,10 +48,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -76,7 +74,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.text.html b/docs/modules/druid.text.html index abb909d..c35de59 100644 --- a/docs/modules/druid.text.html +++ b/docs/modules/druid.text.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -234,7 +232,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid.timer.html b/docs/modules/druid.timer.html index 52c40e5..afc6f94 100644 --- a/docs/modules/druid.timer.html +++ b/docs/modules/druid.timer.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -178,7 +176,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/druid_instance.html b/docs/modules/druid_instance.html index 93f898e..fc11032 100644 --- a/docs/modules/druid_instance.html +++ b/docs/modules/druid_instance.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -709,7 +707,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/docs/modules/helper.formats.html b/docs/modules/helper.formats.html index f2f5a94..59952c4 100644 --- a/docs/modules/helper.formats.html +++ b/docs/modules/helper.formats.html @@ -52,7 +52,6 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • helper.formats
  • @@ -185,7 +184,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:01:59
    diff --git a/docs/modules/helper.html b/docs/modules/helper.html index 1b48bb9..0577525 100644 --- a/docs/modules/helper.html +++ b/docs/modules/helper.html @@ -52,10 +52,8 @@
  • druid.text
  • druid.timer
  • component
  • -
  • const
  • druid
  • helper
  • -
  • helper.formats
  • druid.progress_rich
  • druid_instance
  • @@ -72,12 +70,12 @@

    Functions

    - - + + - - + +
    centrate_text_with_icon(text_node, icon_node, margin)Text node or icon node can be nilcentrate_text_with_icon([text_node][, icon_node], margin)Center two nodes.
    centrate_icon_with_text(icon_node, text_node, margin)Icon node or text node can be nilcentrate_icon_with_text([icon_node[, text_node[, margin=0]]])Center two nodes.
    @@ -90,22 +88,29 @@
    - centrate_text_with_icon(text_node, icon_node, margin) + centrate_text_with_icon([text_node][, icon_node], margin)
    - Text node or icon node can be nil + 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
    @@ -116,22 +121,30 @@
    - centrate_icon_with_text(icon_node, text_node, margin) + centrate_icon_with_text([icon_node[, text_node[, margin=0]]])
    - Icon node or text node can be nil + 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)
    @@ -147,7 +160,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-02-06 01:47:09 +Last updated 2020-02-07 01:09:38
    diff --git a/druid/const.lua b/druid/const.lua index c94fb5c..ace87b6 100644 --- a/druid/const.lua +++ b/druid/const.lua @@ -1,10 +1,9 @@ --- Druid constants +-- @local -- @module const local M = {} - --- Actions M.ACTION_TOUCH = hash("touch") M.ACTION_TEXT = hash("text") M.ACTION_BACKSPACE = hash("backspace") diff --git a/druid/helper.lua b/druid/helper.lua index 781480c..d842bd2 100644 --- a/druid/helper.lua +++ b/druid/helper.lua @@ -1,4 +1,4 @@ --- Druid helper module +-- Druid helper module for gui layouts -- @module helper local const = require("druid.const") @@ -28,7 +28,13 @@ local function get_icon_width(icon_node) end ---- Text node or icon node can be nil +--- Center two nodes. +-- Nodes will be center around 0 x position +-- text_node will be first (at left side) +-- @function helper.centrate_text_with_icon +-- @tparam[opt] text text_node Gui text node +-- @tparam[opt] box icon_node Gui box node +-- @tparam number margin Offset between nodes function M.centrate_text_with_icon(text_node, icon_node, margin) margin = margin or 0 local text_width = get_text_width(text_node) @@ -49,7 +55,13 @@ function M.centrate_text_with_icon(text_node, icon_node, margin) end ---- Icon node or text node can be nil +--- Center two nodes. +-- Nodes will be center around 0 x position +-- icon_node will be first (at left side) +-- @function helper.centrate_icon_with_text +-- @tparam[opt] box icon_node Gui box node +-- @tparam[opt] text text_node Gui text node +-- @tparam[opt=0] number margin Offset between nodes function M.centrate_icon_with_text(icon_node, text_node, margin) margin = margin or 0 local icon_width = get_icon_width(icon_node) diff --git a/druid/helper/formats.lua b/druid/helper/formats.lua index d08dccf..626ee52 100644 --- a/druid/helper/formats.lua +++ b/druid/helper/formats.lua @@ -1,4 +1,5 @@ --- Druid module with utils on string formats +-- @local -- @module helper.formats local const = require("druid.const")