mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Add more annotations, update grid_page example
This commit is contained in:
@@ -267,6 +267,7 @@ end
|
||||
-- It will change content gui node size
|
||||
-- @tparam Scroll self
|
||||
-- @tparam vector3 size The new size for content node
|
||||
-- @tparam 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
|
||||
@@ -361,6 +362,10 @@ function Scroll.set_vertical_scroll(self, state)
|
||||
end
|
||||
|
||||
|
||||
--- Check node if it visible now on scroll
|
||||
-- @tparam Scroll self
|
||||
-- @tparma node node The node to check
|
||||
-- @treturn boolean True, if node in visible scroll area
|
||||
function Scroll.is_node_in_view(self, node)
|
||||
local node_border = helper.get_border(node, gui.get_position(node))
|
||||
local view_border = helper.get_border(self.view_node, -self.position)
|
||||
|
@@ -318,7 +318,9 @@ function StaticGrid.clear(self)
|
||||
end
|
||||
|
||||
|
||||
-- return vector where content borders starts
|
||||
--- Return StaticGrid offset, where StaticGrid content starts.
|
||||
-- @tparam StaticGrid self The StaticGrid instance
|
||||
-- @treturn vector3 The StaticGrid offset
|
||||
function StaticGrid:get_offset()
|
||||
local borders = self:get_borders()
|
||||
local size = self:get_size()
|
||||
|
Reference in New Issue
Block a user