mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 02:22:18 +02:00
Add Bind layout and hotkey node bind
This commit is contained in:
@@ -56,9 +56,11 @@ function M:init(node_or_node_id, layout_type)
|
||||
self.size = gui.get_size(self.node)
|
||||
|
||||
self.padding = gui.get_slice9(self.node)
|
||||
-- Grab default margins from slice9 z/w values
|
||||
-- Margin X is a Slice9 R Value
|
||||
-- Margin Y is a Slice9 B Value
|
||||
self.margin = { x = self.padding.z, y = self.padding.w }
|
||||
-- Use symmetrical padding from x/z
|
||||
-- Padding X is a Slice9 L Value
|
||||
-- Padding Y is a Slice9 T Value
|
||||
self.padding.z = self.padding.x
|
||||
self.padding.w = self.padding.y
|
||||
|
||||
@@ -86,6 +88,12 @@ function M:get_entities()
|
||||
end
|
||||
|
||||
|
||||
---@return number count The count of entities in layout
|
||||
function M:get_entities_count()
|
||||
return #self.entities
|
||||
end
|
||||
|
||||
|
||||
---@param node node The node to set the index of
|
||||
---@param index number The index to set the node to
|
||||
---@return druid.layout self for chaining
|
||||
|
Reference in New Issue
Block a user