mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Update
This commit is contained in:
parent
e59a2b0bcb
commit
917a84fc94
@ -67,7 +67,7 @@ nodes {
|
|||||||
}
|
}
|
||||||
type: TYPE_TEXT
|
type: TYPE_TEXT
|
||||||
text: "Mini Graph"
|
text: "Mini Graph"
|
||||||
font: "druid_text_regular"
|
font: "druid_text_bold"
|
||||||
id: "text_header"
|
id: "text_header"
|
||||||
pivot: PIVOT_NW
|
pivot: PIVOT_NW
|
||||||
outline {
|
outline {
|
||||||
|
@ -99,7 +99,16 @@ end
|
|||||||
|
|
||||||
function M:clear_created_properties()
|
function M:clear_created_properties()
|
||||||
for index = 1, #self.properties do
|
for index = 1, #self.properties do
|
||||||
gui.delete_node(self.properties[index].root)
|
local property = self.properties[index]
|
||||||
|
|
||||||
|
-- If prefab used clone nodes we can remove it
|
||||||
|
if property:get_nodes() then
|
||||||
|
gui.delete_node(property.root)
|
||||||
|
else
|
||||||
|
-- Probably we have component placed on scene directly
|
||||||
|
gui.set_enabled(property.root, false)
|
||||||
|
end
|
||||||
|
|
||||||
self.druid:remove(self.properties[index])
|
self.druid:remove(self.properties[index])
|
||||||
end
|
end
|
||||||
self.properties = {}
|
self.properties = {}
|
||||||
@ -264,7 +273,15 @@ function M:remove(widget)
|
|||||||
if self.properties[index] == widget then
|
if self.properties[index] == widget then
|
||||||
self.druid:remove(widget)
|
self.druid:remove(widget)
|
||||||
self.layout:remove(widget.root)
|
self.layout:remove(widget.root)
|
||||||
|
|
||||||
|
-- If prefab used clone nodes we can remove it
|
||||||
|
if widget:get_nodes() then
|
||||||
gui.delete_node(widget.root)
|
gui.delete_node(widget.root)
|
||||||
|
else
|
||||||
|
-- Probably we have component placed on scene directly
|
||||||
|
gui.set_enabled(widget.root, false)
|
||||||
|
end
|
||||||
|
|
||||||
table.remove(self.properties, index)
|
table.remove(self.properties, index)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user