This commit is contained in:
2026-01-21 09:05:02 -06:00
parent 18ca9e14ba
commit f7be9c3344
30 changed files with 237 additions and 246 deletions

View File

@@ -74,7 +74,7 @@ clay_input.click = function click(tree_root, mousepos, button = 'left') {
clay_input.get_actionable = function get_actionable(tree_root) {
var actionable = []
function walk(node) {
if (node.config.action) actionable.push(node)
if (node.config.action) push(actionable, node)
if (node[clay.CHILDREN])
arrfor(node[clay.CHILDREN], walk)
}
@@ -85,7 +85,7 @@ clay_input.get_actionable = function get_actionable(tree_root) {
clay_input.filter = function filter(tree_root, predicate) {
var results = []
function rec(node) {
if (predicate(node)) results.push(node)
if (predicate(node)) push(results, node)
if (node[clay.CHILDREN])
arrfor(node[clay.CHILDREN], rec)
}