mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update docs, changelogs, example. Prepare to 0.6.0 release
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
--- Button component from click_node
|
||||
-- @tfield Button button
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local component = require("druid.component")
|
||||
|
@@ -9,6 +9,7 @@
|
||||
--- Array of checkbox components
|
||||
-- @tfield table checkboxes
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local component = require("druid.component")
|
||||
|
@@ -6,10 +6,10 @@
|
||||
|
||||
|
||||
--- The Druid scroll component
|
||||
-- @tfield Scroll scroll
|
||||
-- @tfield druid.scroll scroll
|
||||
|
||||
--- The Druid Grid component
|
||||
-- @tfield StaticGrid grid
|
||||
-- @tfield druid.static_grid grid
|
||||
|
||||
--- The current visual top data index
|
||||
-- @tfield number top_index
|
||||
@@ -17,9 +17,13 @@
|
||||
--- The current visual last data index
|
||||
-- @tfield number last_index
|
||||
|
||||
--- The current progress of scroll posititon (approx.)
|
||||
--- The current progress of scroll posititon
|
||||
-- @tfield number scroll_progress
|
||||
|
||||
--- Event triggered when scroll progress is changed; event(self, progress_value)
|
||||
-- @tfield druid_event on_scroll_progress_change
|
||||
|
||||
---
|
||||
|
||||
local const = require("druid.const")
|
||||
local helper = require("druid.helper")
|
||||
@@ -31,8 +35,8 @@ local DataList = component.create("data_list")
|
||||
|
||||
--- Data list constructor
|
||||
-- @tparam DataList self
|
||||
-- @tparam druid.scroll The Scroll instance for Data List component
|
||||
-- @tparam druid.grid The Grid instance for Data List component
|
||||
-- @tparam druid.scroll scroll The Scroll instance for Data List component
|
||||
-- @tparam druid.grid 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])
|
||||
function DataList.init(self, scroll, grid, create_function)
|
||||
self.druid = self:get_druid()
|
||||
@@ -40,7 +44,7 @@ function DataList.init(self, scroll, grid, create_function)
|
||||
self.grid = grid
|
||||
self.scroll:bind_grid(grid)
|
||||
|
||||
--- Current visual elements indexes
|
||||
-- Current visual elements indexes
|
||||
self.top_index = 1
|
||||
self.last_index = 1
|
||||
self.scroll_progress = 0
|
||||
|
@@ -36,6 +36,7 @@
|
||||
--- The size of item content
|
||||
-- @tfield vector4 border
|
||||
|
||||
---
|
||||
|
||||
local const = require("druid.const")
|
||||
local Event = require("druid.event")
|
||||
@@ -177,7 +178,6 @@ end
|
||||
--- Remove the item from the grid. Note that gui node will be not deleted
|
||||
-- @tparam DynamicGrid self
|
||||
-- @tparam number index The grid node index to remove
|
||||
-- @tparam[opt=false] bool is_shift_left If true, shift all nodes to the left, otherwise shift nodes to the right
|
||||
-- @tparam[opt=SHIFT.RIGHT] number shift_policy How shift nodes, if required. See const.SHIFT
|
||||
-- @treturn Node The deleted gui node from grid
|
||||
function DynamicGrid.remove(self, index, shift_policy)
|
||||
|
@@ -44,6 +44,7 @@
|
||||
--- Gui keyboard type for input field
|
||||
-- @tfield number keyboard_type
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local const = require("druid.const")
|
||||
|
@@ -10,6 +10,7 @@
|
||||
--- The text component
|
||||
-- @tfield Text text
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local settings = require("druid.system.settings")
|
||||
|
@@ -25,6 +25,7 @@
|
||||
--- Progress bar slice9 settings
|
||||
-- @tfield vector4 slice
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local const = require("druid.const")
|
||||
|
@@ -9,6 +9,7 @@
|
||||
--- Array of checkbox components
|
||||
-- @tfield Checkbox[] checkboxes
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local component = require("druid.component")
|
||||
|
@@ -30,6 +30,7 @@
|
||||
--- Current slider value
|
||||
-- @tfield number value
|
||||
|
||||
---
|
||||
|
||||
|
||||
local Event = require("druid.event")
|
||||
|
@@ -26,6 +26,7 @@
|
||||
--- Current timer value
|
||||
-- @tfield number value
|
||||
|
||||
---
|
||||
|
||||
local Event = require("druid.event")
|
||||
local formats = require("druid.helper.formats")
|
||||
|
Reference in New Issue
Block a user