mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
dont activate button, if disabled
This commit is contained in:
@@ -36,4 +36,15 @@ function M.step(current, target, step)
|
||||
end
|
||||
|
||||
|
||||
function M.is_enabled(node)
|
||||
local is_enabled = gui.is_enabled(node)
|
||||
local parent = gui.get_parent(node)
|
||||
while parent and is_enabled do
|
||||
is_enabled = is_enabled and gui.is_enabled(parent)
|
||||
parent = gui.get_parent(parent)
|
||||
end
|
||||
return is_enabled
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user