2023-09-25 12:30:32 -04:00
|
|
|
const { Revealer, Box } = ags.Widget;
|
|
|
|
const { openWindow } = ags.App;
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-09-25 12:30:32 -04:00
|
|
|
export const PopUp = ({name, child, transition = 'slide_down', ...params}) => Box({
|
|
|
|
style: 'min-height:1px; min-width:1px',
|
|
|
|
child: Revealer({
|
|
|
|
...params,
|
|
|
|
transition,
|
|
|
|
transitionDuration: 500,
|
|
|
|
connections: [[ags.App, (revealer, currentName, visible) => {
|
|
|
|
if (currentName === name) {
|
|
|
|
revealer.reveal_child = visible;
|
2023-09-22 01:34:36 -04:00
|
|
|
|
2023-09-25 12:30:32 -04:00
|
|
|
if (visible && name !== 'overview')
|
|
|
|
openWindow('closer');
|
|
|
|
}
|
|
|
|
}]],
|
|
|
|
child: child,
|
|
|
|
}),
|
2023-09-21 20:01:14 -04:00
|
|
|
});
|