godot icon indicating copy to clipboard operation
godot copied to clipboard

[iOS] Add changing of OS UI settings at runtime

Open ztc0611 opened this issue 1 year ago • 12 comments

Closes https://github.com/godotengine/godot-proposals/issues/8556.

Allows changing the state of gesture suppression and visibility of the status bar/home indicator at runtime. The use of this could be to only show or hide these functions in certain contexts, such as making only one swipe be required to leave a main menu or pause screen, but while the game is running it requires a double swipe. This is currently impossible as it requires signals to be sent to the OS that were not implemented before.

In my proposal, I outlined 3 options. I have implemented Option 2 and Option 3 as separate commits on this branch. I think Option 2 looks cleaner, but I'm not sure how big of a deal it is to add a new enum, especially one for just a single platform.

Once a preferred option is chosen and the function/enum names are considered good to go, I'll add the documentation and clean up to meet the code style checks. Option 2 also currently lacks the bindings for the enum in GDScript which I will fix if it is chosen.

Also if there would be a better place to put this than DisplayServer, such as OS, I'm happy to move it. 😄

Attached are test projects for each option. Option 2.zip Option 3.zip

ztc0611 avatar Dec 04 '23 23:12 ztc0611