Is there an event to detect when the game enters fullscreen mode on a mobile device ?
And when such an event is fired, is there a way to force a widgets with isAlignOnce true to recalculate their position ?
Is there an event to detect when the game enters fullscreen mode on a mobile device ?
And when such an event is fired, is there a way to force a widgets with isAlignOnce true to recalculate their position ?
You can use
if (cc.sys.isMobile) {
window.addEventListener('resize', YourCallback);
}
else { // desktop browser
cc.eventManager.addCustomListener('canvas-resize', YourCallback);
}
We discuss about it, thank you for your advise!
This did work, thanks!
Iām looking forward an upcoming solution. Maybe temporarily disable the isAlignOnce option.
This feature will be landed on v1.10.