mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update docs
This commit is contained in:
parent
a87a576ded
commit
a846adf97b
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle back key (android, backspace)
|
--- Component to handle back key (android, backspace)
|
||||||
-- @module BackHandler
|
-- @module BackHandler
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to block input on specify zone by node
|
--- Component to block input on specify zone by node
|
||||||
-- @module Blocker
|
-- @module Blocker
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle basic GUI button
|
--- Component to handle basic GUI button
|
||||||
-- @module Button
|
-- @module Button
|
||||||
@ -392,6 +392,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
--- Set function for additional check for button click availability
|
--- Set function for additional check for button click availability
|
||||||
|
-- @tparam Button self
|
||||||
-- @tparam[opt] function check_function Should return true or false. If true - button can be pressed.
|
-- @tparam[opt] function check_function Should return true or false. If true - button can be pressed.
|
||||||
-- @tparam[opt] function failure_callback Function what will be called on button click, if check function return false
|
-- @tparam[opt] function failure_callback Function what will be called on button click, if check function return false
|
||||||
-- @treturn Button Current button instance
|
-- @treturn Button Current button instance
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle drag action on node.
|
--- Component to handle drag action on node.
|
||||||
-- Drag have correct handling for multitouch and swap
|
-- Drag have correct handling for multitouch and swap
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle hover node interaction
|
--- Component to handle hover node interaction
|
||||||
-- @module Hover
|
-- @module Hover
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle scroll content.
|
--- Component to handle scroll content.
|
||||||
-- Scroll consist from two nodes: scroll parent and scroll input
|
-- Scroll consist from two nodes: scroll parent and scroll input
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle placing components by row and columns.
|
--- Component to handle placing components by row and columns.
|
||||||
-- Grid can anchor your elements, get content size and other
|
-- Grid can anchor your elements, get content size and other
|
||||||
@ -181,10 +181,10 @@ end
|
|||||||
|
|
||||||
--- Add new item to the grid
|
--- Add new item to the grid
|
||||||
-- @tparam StaticGrid self
|
-- @tparam StaticGrid self
|
||||||
-- @tparam node item Gui node
|
-- @tparam node item Gui node
|
||||||
-- @tparam[opt] number index The item position. By default add as last item
|
-- @tparam[opt] number index The item position. By default add as last item
|
||||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instance If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
function StaticGrid.add(self, item, index, shift_policy, is_instant)
|
function StaticGrid.add(self, item, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
index = index or ((self.last_index or 0) + 1)
|
index = index or ((self.last_index or 0) + 1)
|
||||||
@ -222,7 +222,7 @@ end
|
|||||||
-- @tparam StaticGrid self
|
-- @tparam StaticGrid self
|
||||||
-- @tparam number index The grid node index to remove
|
-- @tparam number index The grid node index to remove
|
||||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instance If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
-- @treturn Node The deleted gui node from grid
|
-- @treturn Node The deleted gui node from grid
|
||||||
function StaticGrid.remove(self, index, shift_policy, is_instant)
|
function StaticGrid.remove(self, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
@ -357,7 +357,7 @@ end
|
|||||||
-- @tparam StaticGrid self
|
-- @tparam StaticGrid self
|
||||||
-- @tparam number in_row The new in_row value
|
-- @tparam number in_row The new in_row value
|
||||||
-- @treturn druid.static_grid Current grid instance
|
-- @treturn druid.static_grid Current grid instance
|
||||||
function StaticGrid:set_in_row(in_row)
|
function StaticGrid.set_in_row(self, in_row)
|
||||||
self.in_row = in_row
|
self.in_row = in_row
|
||||||
self._grid_horizonal_offset = self.node_size.x * (self.in_row - 1) * self.anchor.x
|
self._grid_horizonal_offset = self.node_size.x * (self.in_row - 1) * self.anchor.x
|
||||||
self:_update(true)
|
self:_update(true)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle swipe gestures on node.
|
--- Component to handle swipe gestures on node.
|
||||||
-- Swipe will be triggered, if swipe was started and
|
-- Swipe will be triggered, if swipe was started and
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle all GUI texts.
|
--- Component to handle all GUI texts.
|
||||||
-- Druid text can adjust itself for text node size
|
-- Druid text can adjust itself for text node size
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Basic class for all Druid components.
|
--- Basic class for all Druid components.
|
||||||
-- To create you component, use `component.create`
|
-- To create you component, use `component.create`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid constants
|
--- Druid constants
|
||||||
-- @local
|
-- @local
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid UI Library.
|
--- Druid UI Library.
|
||||||
-- Powerful Defold component based UI library. Use standart
|
-- Powerful Defold component based UI library. Use standart
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Lua event small library
|
--- Druid lua event library
|
||||||
-- @module DruidEvent
|
-- @module DruidEvent
|
||||||
-- @alias druid_event
|
-- @alias druid_event
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid checkbox component
|
--- Druid checkbox component
|
||||||
-- @module Checkbox
|
-- @module Checkbox
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Checkbox group module
|
--- Checkbox group module
|
||||||
-- @module CheckboxGroup
|
-- @module CheckboxGroup
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid component template
|
--- Druid component template
|
||||||
-- @module druid.component
|
-- @module druid.component
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to manage data for huge dataset in scroll.
|
--- Component to manage data for huge dataset in scroll.
|
||||||
-- It requires Druid Scroll and Druid Grid (Static or Dynamic) components
|
-- It requires Druid Scroll and Druid Grid (Static or Dynamic) components
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle placing components in row
|
--- Component to handle placing components in row
|
||||||
-- @module DynamicGrid
|
-- @module DynamicGrid
|
||||||
@ -140,7 +140,7 @@ end
|
|||||||
-- @tparam node node Gui node
|
-- @tparam node node Gui node
|
||||||
-- @tparam[opt] number index The node position. By default add as last node
|
-- @tparam[opt] number index The node position. By default add as last node
|
||||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instance If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
function DynamicGrid.add(self, node, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
local delta = shift_policy -- -1 or 1 or 0
|
local delta = shift_policy -- -1 or 1 or 0
|
||||||
@ -182,7 +182,7 @@ end
|
|||||||
-- @tparam DynamicGrid self
|
-- @tparam DynamicGrid self
|
||||||
-- @tparam number index The grid node index to remove
|
-- @tparam number index The grid node index to remove
|
||||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||||
-- @tparam[opt=false] boolean is_instance If true, update node positions instantly
|
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
|
||||||
-- @treturn Node The deleted gui node from grid
|
-- @treturn Node The deleted gui node from grid
|
||||||
function DynamicGrid.remove(self, index, shift_policy, is_instant)
|
function DynamicGrid.remove(self, index, shift_policy, is_instant)
|
||||||
shift_policy = shift_policy or const.SHIFT.RIGHT
|
shift_policy = shift_policy or const.SHIFT.RIGHT
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid input text component.
|
--- Druid input text component.
|
||||||
-- Carry on user text input
|
-- Carry on user text input
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle all GUI texts
|
--- Component to handle all GUI texts
|
||||||
-- Good working with localization system
|
-- Good working with localization system
|
||||||
@ -63,7 +63,13 @@ end
|
|||||||
--- Translate the text by locale_id
|
--- Translate the text by locale_id
|
||||||
-- @tparam LangText self
|
-- @tparam LangText self
|
||||||
-- @tparam string locale_id Locale id
|
-- @tparam string locale_id Locale id
|
||||||
-- @tparam string ... Locale arguments to pass in text function
|
-- @tparam[opt] string a Optional param to string.format
|
||||||
|
-- @tparam[opt] string b Optional param to string.format
|
||||||
|
-- @tparam[opt] string c Optional param to string.format
|
||||||
|
-- @tparam[opt] string d Optional param to string.format
|
||||||
|
-- @tparam[opt] string e Optional param to string.format
|
||||||
|
-- @tparam[opt] string f Optional param to string.format
|
||||||
|
-- @tparam[opt] string g Optional param to string.format
|
||||||
-- @treturn LangText Current instance
|
-- @treturn LangText Current instance
|
||||||
function LangText.translate(self, locale_id, a, b, c, d, e, f, g)
|
function LangText.translate(self, locale_id, a, b, c, d, e, f, g)
|
||||||
self.last_locale_args = { a, b, c, d, e, f, g }
|
self.last_locale_args = { a, b, c, d, e, f, g }
|
||||||
@ -76,7 +82,13 @@ end
|
|||||||
|
|
||||||
--- Format string with new text params on localized text
|
--- Format string with new text params on localized text
|
||||||
-- @tparam LangText self
|
-- @tparam LangText self
|
||||||
-- @tparam string ... Locale arguments to pass in text function
|
-- @tparam[opt] string a Optional param to string.format
|
||||||
|
-- @tparam[opt] string b Optional param to string.format
|
||||||
|
-- @tparam[opt] string c Optional param to string.format
|
||||||
|
-- @tparam[opt] string d Optional param to string.format
|
||||||
|
-- @tparam[opt] string e Optional param to string.format
|
||||||
|
-- @tparam[opt] string f Optional param to string.format
|
||||||
|
-- @tparam[opt] string g Optional param to string.format
|
||||||
-- @treturn LangText Current instance
|
-- @treturn LangText Current instance
|
||||||
function LangText.format(self, a, b, c, d, e, f, g)
|
function LangText.format(self, a, b, c, d, e, f, g)
|
||||||
self.last_locale_args = { a, b, c, d, e, f, g }
|
self.last_locale_args = { a, b, c, d, e, f, g }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Basic progress bar component.
|
--- Basic progress bar component.
|
||||||
-- For correct progress bar init it should be in max size from gui
|
-- For correct progress bar init it should be in max size from gui
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Radio group module
|
--- Radio group module
|
||||||
-- @module RadioGroup
|
-- @module RadioGroup
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid slider component
|
--- Druid slider component
|
||||||
-- @module Slider
|
-- @module Slider
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Component to handle GUI timers.
|
--- Component to handle GUI timers.
|
||||||
-- Timer updating by game delta time. If game is not focused -
|
-- Timer updating by game delta time. If game is not focused -
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
-- Druid helper module for gui layouts
|
--- Druid helper module for gui layouts
|
||||||
-- @module helper
|
-- @module Helper
|
||||||
|
-- @alias druid.helper
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid inner module to acquire/release input
|
--- Druid inner module to acquire/release input
|
||||||
-- @module helper.input
|
-- @module helper.input
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid module with utils on string formats
|
--- Druid module with utils on string formats
|
||||||
-- @local
|
-- @local
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
local settings = require("druid.system.settings")
|
local settings = require("druid.system.settings")
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Instance of Druid. Make one instance per gui_script with next code:
|
--- Instance of Druid. Make one instance per gui_script with next code:
|
||||||
--
|
--
|
||||||
@ -401,6 +401,7 @@ end
|
|||||||
|
|
||||||
--- Druid on focus gained interest function.
|
--- Druid on focus gained interest function.
|
||||||
-- This one called by on_window_callback by global window listener
|
-- This one called by on_window_callback by global window listener
|
||||||
|
-- @function druid_instance.on_focus_gained
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
function DruidInstance.on_focus_gained(self)
|
function DruidInstance.on_focus_gained(self)
|
||||||
local components = self.components_interest[base_component.ON_FOCUS_GAINED]
|
local components = self.components_interest[base_component.ON_FOCUS_GAINED]
|
||||||
@ -413,8 +414,8 @@ end
|
|||||||
--- Druid on language change.
|
--- Druid on language change.
|
||||||
-- This one called by global gruid.on_language_change, but can be
|
-- This one called by global gruid.on_language_change, but can be
|
||||||
-- call manualy to update all translations
|
-- call manualy to update all translations
|
||||||
|
-- @function druid_instance.on_language_change
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @function druid.on_language_change
|
|
||||||
function DruidInstance.on_language_change(self)
|
function DruidInstance.on_language_change(self)
|
||||||
local components = self.components_interest[base_component.ON_LANGUAGE_CHANGE]
|
local components = self.components_interest[base_component.ON_LANGUAGE_CHANGE]
|
||||||
for i = 1, #components do
|
for i = 1, #components do
|
||||||
@ -426,9 +427,9 @@ end
|
|||||||
--- Set whitelist components for input processing.
|
--- Set whitelist components for input processing.
|
||||||
-- If whitelist is not empty and component not contains in this list,
|
-- If whitelist is not empty and component not contains in this list,
|
||||||
-- component will be not processed on input step
|
-- component will be not processed on input step
|
||||||
|
-- @function druid_instance.set_whitelist
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam[opt=nil] table|Component whitelist_components The array of component to whitelist
|
-- @tparam[opt=nil] table|Component whitelist_components The array of component to whitelist
|
||||||
-- @function druid.set_whitelist
|
|
||||||
function DruidInstance.set_whitelist(self, whitelist_components)
|
function DruidInstance.set_whitelist(self, whitelist_components)
|
||||||
if whitelist_components and whitelist_components.isInstanceOf then
|
if whitelist_components and whitelist_components.isInstanceOf then
|
||||||
whitelist_components = { whitelist_components }
|
whitelist_components = { whitelist_components }
|
||||||
@ -449,9 +450,9 @@ end
|
|||||||
--- Set blacklist components for input processing.
|
--- Set blacklist components for input processing.
|
||||||
-- If blacklist is not empty and component contains in this list,
|
-- If blacklist is not empty and component contains in this list,
|
||||||
-- component will be not processed on input step
|
-- component will be not processed on input step
|
||||||
|
-- @function druid_instance.set_blacklist
|
||||||
-- @tparam DruidInstance self
|
-- @tparam DruidInstance self
|
||||||
-- @tparam[opt=nil] table|Component blacklist_components The array of component to blacklist
|
-- @tparam[opt=nil] table|Component blacklist_components The array of component to blacklist
|
||||||
-- @function druid.set_blacklist
|
|
||||||
function DruidInstance.set_blacklist(self, blacklist_components)
|
function DruidInstance.set_blacklist(self, blacklist_components)
|
||||||
if blacklist_components and blacklist_components.isInstanceOf then
|
if blacklist_components and blacklist_components.isInstanceOf then
|
||||||
blacklist_components = { blacklist_components }
|
blacklist_components = { blacklist_components }
|
||||||
@ -648,8 +649,8 @@ end
|
|||||||
|
|
||||||
--- Create data list basic component
|
--- Create data list basic component
|
||||||
-- @function druid:new_data_list
|
-- @function druid:new_data_list
|
||||||
-- @tparam druid.scroll druid_scroll The Scroll instance for Data List component
|
-- @tparam Scroll druid_scroll The Scroll instance for Data List component
|
||||||
-- @tparam druid.grid druid_grid The Grid instance for Data List component
|
-- @tparam Grid druid_grid The Grid instance for Data List component
|
||||||
-- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component])
|
-- @tparam function create_function The create function callback(self, data, index, data_list). Function should return (node, [component])
|
||||||
-- @treturn DataList data_list component
|
-- @treturn DataList data_list component
|
||||||
function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function)
|
function DruidInstance.new_data_list(self, druid_scroll, druid_grid, create_function)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- Copyright (c) 2021 Maxim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
||||||
|
|
||||||
--- Druid settings file
|
--- Druid settings file
|
||||||
-- @module settings
|
-- @module settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user