From 28570f7ac29ffa3ea9a1117641a1eae776982b57 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 19 Nov 2023 16:21:25 -0500 Subject: [PATCH] feat(ags popup): allow setting child after init --- devices/wim/config/ags/js/misc/popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devices/wim/config/ags/js/misc/popup.js b/devices/wim/config/ags/js/misc/popup.js index b4540d29..55450285 100644 --- a/devices/wim/config/ags/js/misc/popup.js +++ b/devices/wim/config/ags/js/misc/popup.js @@ -54,7 +54,7 @@ export default ({ onClose(child); } }]], - child: child, + child: child || Box(), }), }), }); @@ -62,7 +62,8 @@ export default ({ // Make getting the original child passed in // this function easier when making more code // 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 window.closeOnUnfocus = closeOnUnfocus;