refactor button

This commit is contained in:
Insality
2019-09-25 20:53:32 +03:00
parent b72e7451e1
commit 711b28ede1
3 changed files with 82 additions and 42 deletions

View File

@@ -67,6 +67,17 @@ function M.centrate_icon_with_text(icon_node, text_node, margin)
end
-- call callback after count calls
function M.after(count, callback)
local closure = function()
count = count - 1
if count <= 0 then
callback()
end
end
return closure
end
local STRING = "string"
function M.get_node(node_or_name)