Can I schedule a callback right before the menu opens and after it closes? When it pauses, it breaks a part of my game, but I think I know how to fix it.
No way to do this right now, but maybe it’s something we should do… If you add a button handler for the menu it will disable the built-in one.
1 Like
Maybe at least expose it in JS so someone could write an extension to do that?
How about something like this?
controller.menu.onEvent(ControllerButtonEvent.Pressed, function() {
// do stuff before system menu
scene.systemMenu.showSystemMenu()
// do stuff after system menu
})
3 Likes
yep, that would work!
1 Like
Yes! It works! Thanks
Also, if anyone else needs to do the same like me and have JS commands in blocks, this is what I do:
THIS ONLY WORKS IF YOU USE GITHUB INTERGRATION
- Commit to GitHub.
- Go to JS.
- Type the command you need.
- Go back to blocks.
- If the layout isn’t messed up, nice! If it is, keep going.
- Select the JS block and press ctrl + c
- Revert all changes.
- Press ctrl + v.
- The block should be somewhere!
1 Like