This creates a nice semi-transparent background which also prevents the user from touching any elements it overshadows. However, this means redrawing the entire screen instead of the portion of the screen where the messagebox should be displayed.
Creating a background myself and just setting the opacity to 0 sadly does not work, it will still attempt to draw the (technically invisible) background.
What other options do I have? Maybe a flag I overlooked…
after trying some more options I eventually decided to just disable all inputs “manually” by recursively looping through the background’s (screen obj) children and disabling the CLICKABLE flag for each child. It turns out that this is the only flag that needs to be disabled, disabling and re-enabling other flags afterwards lead to unexpected results.
After disabling all inputs I add the messagebox as a child of the background: all inputs here will still be enabled normally because it is added after disabling the other children’s input.
Hope this post helps others also trying to do the same thing! I mainly wanted to avoid the semi-transparent background because redrawing the whole screen takes too much time.