Windows 10 - window size change update

Windows 10 - window size change update
0.0 0

#1

Hi there,

I am trying to port my game to Windows 10. It works well on mobiles. Currently I am using FIXED_WIDTH or FIXED_HEIGHT policy (depending on the screen ratio). Unfortunately, it doesn’t work well on Windows 8/10 because user can scale the window in any direction. Somehow it works with SHOW_ALL, but with black borders.

How to deal with the window size change in Windows 10? What is a “good cocos2dx practice” for this situation?

I can’t find any “onSizeChange” (or something) so that I could relayout my UI. Should I implement it by myself?

How can I set the default window size? There is no GLViewImpl::createWithRect method for Windows 8/10.

Thanks,
kds


#2

Anyone? :slight_smile:


#3

Something like this was added recently, check if it helps:
https://github.com/cocos2d/cocos2d-x/pull/16578


#4

Thanks :slight_smile: I am working on older cocos, so couldn’t find it. Unfortunately, it is only for win32. Is there something similar (or do you have a plan to add in the future) for W10?