mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update tests
This commit is contained in:
@@ -152,7 +152,7 @@ end
|
||||
---Set new size of layout node
|
||||
---@param width number|nil The width to set
|
||||
---@param height number|nil The height to set
|
||||
---@param anchor_pivot constant|nil If set will keep the corner possition relative to the new size
|
||||
---@param anchor_pivot constant|nil If set will keep the corner position relative to the new size
|
||||
---@return druid.container Container
|
||||
function M:set_size(width, height, anchor_pivot)
|
||||
width = width or self.size.x
|
||||
|
@@ -162,7 +162,7 @@ function M:get_index(data)
|
||||
end
|
||||
|
||||
|
||||
---Return all currenly created nodes in DataList
|
||||
---Return all currently created nodes in DataList
|
||||
---@return node[] List of created nodes
|
||||
function M:get_created_nodes()
|
||||
local nodes = {}
|
||||
@@ -175,7 +175,7 @@ function M:get_created_nodes()
|
||||
end
|
||||
|
||||
|
||||
---Return all currenly created components in DataList
|
||||
---Return all currently created components in DataList
|
||||
---@return druid.component[] components List of created components
|
||||
function M:get_created_components()
|
||||
local components = {}
|
||||
|
@@ -3,7 +3,7 @@ local helper = require("druid.helper")
|
||||
local component = require("druid.component")
|
||||
|
||||
---@class druid.progress.style
|
||||
---@field SPEED number|nil Progress bas fill rate. More -> faster. Default: 5
|
||||
---@field SPEED number|nil Progress bar fill rate. Higher value means faster fill. Default: 5
|
||||
---@field MIN_DELTA number|nil Minimum step to fill progress bar. Default: 0.005
|
||||
|
||||
---Basic Druid progress bar component. Changes the size or scale of a node to represent progress.
|
||||
@@ -12,10 +12,10 @@ local component = require("druid.component")
|
||||
---Create progress bar component with druid: `progress = druid:new_progress(node_name, key, init_value)`
|
||||
---
|
||||
---### Notes
|
||||
---- Node should have maximum node size in GUI scene, it's represent the progress bar maximum size
|
||||
---- Node should have maximum node size in GUI scene, it represents the progress bar's maximum size
|
||||
---- Key is value from druid const: "x" or "y"
|
||||
---- Progress works correctly with 9slice nodes, it tries to set size by _set_size_ first, until minimum size is reached, then it sizing via _set_scale_
|
||||
---- Progress bar can fill only by vertical or horizontal size. For diagonal progress bar, just rotate node in GUI scene
|
||||
---- Progress works correctly with 9slice nodes, it tries to set size by _set_size_ first until minimum size is reached, then it continues sizing via _set_scale_
|
||||
---- Progress bar can fill only by vertical or horizontal size. For diagonal progress bar, just rotate the node in GUI scene
|
||||
---- If you have glitchy or dark texture bugs with progress bar, try to disable mipmaps in your texture profiles
|
||||
---@class druid.progress: druid.component
|
||||
---@field node node The progress bar node
|
||||
|
Reference in New Issue
Block a user