Forums

OverviewV-Play 1 SupportDetecting application state › Reply To: Detecting application state

OverviewV-Play 1 SupportDetecting application state › Reply To: Detecting application state
#5883

Christian
V-Play Team

Hi Raimonds,

there are 2 functions that are currently not documented, but which you can use to pause and resume your game manually. You can have a look in the Squaby demo or wizard in the SquabyScene.qml and search for system.resumeGameForObject() and system.pauseGameForObject().

What these functions do, they pause and resume all Timers and animations for the children objects of the item you provide them as a parameter. You can try to click the menu button in a Squaby game, and you will see the level creation and entity movement is paused. So you could trigger a call of pauseGameForObject() when the onApplicationPaused() signal handler is called in GameWindow, and resumeGameForObject() NOT in resume, but when you press your resume button in the game.

Cheers, Chris

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support