From 2cef65ed4081e3ba13e300091a4d020ba60d7c4e Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:22:34 +0300 Subject: [PATCH] Fix scroll annotations --- druid/annotations.lua | 10 +++++----- druid/base/scroll.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index e2b93f3..8ff350f 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -1042,25 +1042,25 @@ function druid__scroll.is_node_in_view(self, node) end --- Start scroll to target point. ---@param self druid.scroll @{Scroll} ---@param point vector3 Target point ----@param is_instant bool Instant scroll flag +---@param is_instant? bool Instant scroll flag function druid__scroll.scroll_to(self, point, is_instant) end --- Scroll to item in scroll by point index. ---@param self druid.scroll @{Scroll} ---@param index number Point index ----@param skip_cb bool If true, skip the point callback +---@param skip_cb? bool If true, skip the point callback function druid__scroll.scroll_to_index(self, index, skip_cb) end --- Start scroll to target scroll percent ---@param self druid.scroll @{Scroll} ---@param percent vector3 target percent ----@param is_instant bool instant scroll flag +---@param is_instant? bool instant scroll flag function druid__scroll.scroll_to_percent(self, percent, is_instant) end --- Strict drag scroll area. --- Useful for restrict events outside stencil node ---@param self druid.drag ----@param node node Gui node +---@param node node|string Gui node (or node id) function druid__scroll.set_click_zone(self, node) end --- Set extra size for scroll stretching. @@ -1094,7 +1094,7 @@ function druid__scroll.set_points(self, points) end --- It will change content gui node size ---@param self druid.scroll @{Scroll} ---@param size vector3 The new size for content node ----@param offset vector3 Offset value to set, where content is starts +---@param offset? vector3 Offset value to set, where content is starts ---@return druid.scroll Current scroll instance function druid__scroll.set_size(self, size, offset) end diff --git a/druid/base/scroll.lua b/druid/base/scroll.lua index a7b510a..1b42953 100755 --- a/druid/base/scroll.lua +++ b/druid/base/scroll.lua @@ -325,7 +325,7 @@ end -- It will change content gui node size -- @tparam Scroll self @{Scroll} -- @tparam vector3 size The new size for content node --- @tparam vector3 offset Offset value to set, where content is starts +-- @tparam[opt] vector3 offset Offset value to set, where content is starts -- @treturn druid.scroll Current scroll instance function Scroll.set_size(self, size, offset) if offset then