YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Disabling Pulldown Control/Notification Center on iOS #3078

Open ampersandbear opened 1 year ago

ampersandbear commented 1 year ago

Is your feature request related to a problem?

In our game we have a section near the top of the screen where dice can be dragged from. Oftentimes trying to drag a die triggers the Notification Bar instead that pauses the game and creates a lot of frustration for the players. Here's how it looks in action: https://www.dropbox.com/s/wolkx99vwmeo24j/RPReplay_Final1689148733.mov?dl=0

Describe the solution you'd like

It would be ideal if the first drag brought up a little tab and only the second drag brought up the full menu. Example: https://www.dropbox.com/s/471sx9epdqyfw59/RPReplay_Final1689099836.mov?dl=0

As far as we were able to research the issue, this behavior can be achieved by changing the statusBarHidden property: statusBarHidden = YES. Really hoping GMS could offer access to this variable when targeting iOS.

Describe alternatives you've considered

No response

Additional context

No response

HaikuJock commented 1 year ago

Not having this feature effectively reduces the playable area on iOS devices.

I don't think setting statusBarHidden will be enough to do this, the status bar is already hidden, but rather overriding preferredScreenEdgesDeferringSystemGestures and calling setNeedsUpdateOfScreenEdgesDeferringSystemGestures() in the UIViewController (RunnerViewController?). Apple docs

I don't imagine every game will want this feature so an option in Game Options > iOS is desirable. A checkbox for each screen-edge would be ideal.

HaikuJock commented 1 year ago

I've made an extension to enable this. It uses an AppDelegate and replaces the implementations of the necessary functions in the root view-controller at launch. https://github.com/HaikuJock/GMEXT-DeferScreenEdgeSystemGestures