mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Annotations update [3]
This commit is contained in:
@@ -478,7 +478,7 @@ end
|
||||
--
|
||||
-- This functions calls automatically if you don't disable it in game.project: druid.no_stencil_check
|
||||
-- @tparam Button self @{Button}
|
||||
-- @tparam node zone Gui node
|
||||
-- @tparam node|nil zone Gui node
|
||||
-- @treturn Button Current button instance
|
||||
-- @usage
|
||||
-- button:set_click_zone("stencil_node")
|
||||
|
@@ -359,7 +359,7 @@ end
|
||||
--- Set extra size for scroll stretching.
|
||||
-- Set 0 to disable stretching effect
|
||||
-- @tparam Scroll self @{Scroll}
|
||||
-- @tparam[opt=0] number stretch_size Size in pixels of additional scroll area
|
||||
-- @tparam number|nil stretch_size Size in pixels of additional scroll area
|
||||
-- @treturn druid.scroll Current scroll instance
|
||||
function Scroll.set_extra_stretch_size(self, stretch_size)
|
||||
self.style.EXTRA_STRETCH_SIZE = stretch_size or 0
|
||||
|
@@ -213,10 +213,10 @@ end
|
||||
|
||||
--- Add new item to the grid
|
||||
-- @tparam StaticGrid self @{StaticGrid}
|
||||
-- @tparam node item Gui node
|
||||
-- @tparam node item GUI node
|
||||
-- @tparam number|nil 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=false] boolean is_instant If true, update node positions instantly
|
||||
-- @tparam number|nil shift_policy How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||
-- @tparam boolean|nil is_instant If true, update node positions instantly
|
||||
function StaticGrid.add(self, item, index, shift_policy, is_instant)
|
||||
index = index or ((self.last_index or 0) + 1)
|
||||
|
||||
@@ -239,8 +239,8 @@ end
|
||||
--- Remove the item from the grid. Note that gui node will be not deleted
|
||||
-- @tparam StaticGrid self @{StaticGrid}
|
||||
-- @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=false] boolean is_instant If true, update node positions instantly
|
||||
-- @tparam number|nil shift_policy How shift nodes, if required. Default: const.SHIFT.RIGHT
|
||||
-- @tparam boolean|nil is_instant If true, update node positions instantly
|
||||
-- @treturn node The deleted gui node from grid
|
||||
function StaticGrid.remove(self, index, shift_policy, is_instant)
|
||||
assert(self.nodes[index], "No grid item at given index " .. index)
|
||||
|
Reference in New Issue
Block a user