Essentially, I am trying to do what this person does in Unity: https://connect.unity.com/p/updating-your-gui-for-the-iphone-x-and-other-notched-devices. Apple user interface guidelines require UI to not be hidden by the notch which is why I'm trying to figure this out.
It might be worth reading the article because it's hard for me to explain how he does this.
But I think the person uses
Screen.safeArea (in Unity) to get the safe area of the phone screen, which returns a (x, y, width, height). He converts these dimensions to "normalized anchor coordinates". As a result, it pushes the GUI away from the edges of the screen to be in the safe area.
Just like how Unity has
Screen.safeArea , Godot has a basically identical OS method called
get_window_safe_area. They both return a (x, y, width, height) of the safe area's bounds.
How can I take these width/height dimensions of the safe area and turn it into the dimensions of the GUI? So that the GUI is pushed into the safe area.