feat(ags popup): allow setting child after init

This commit is contained in:
matt1432 2023-11-19 16:21:25 -05:00
parent d2059e3d1d
commit 28570f7ac2

View file

@ -54,7 +54,7 @@ export default ({
onClose(child); onClose(child);
} }
}]], }]],
child: child, child: child || Box(),
}), }),
}), }),
}); });
@ -62,7 +62,8 @@ export default ({
// Make getting the original child passed in // Make getting the original child passed in
// this function easier when making more code // this function easier when making more code
// for the widget // for the widget
window.getChild = () => child; window.getChild = () => window.child.children[0].child;
window.setChild = newChild => window.child.children[0].child = newChild;
// This is for my custom pointers.js // This is for my custom pointers.js
window.closeOnUnfocus = closeOnUnfocus; window.closeOnUnfocus = closeOnUnfocus;