Get Window Frame Resize Callback in Mac build

Get Window Frame Resize Callback in Mac build
0.0 0

#1

Hi,
Has anyone tried adjusting the game’s size according to resize window of game in mac.
i am not sure if creator provides resize callback. If it does ,kindly let me know.
Also, while changing the size , initially widget also does not seem to be effective in readjusting the game.
if anyone has pointers regarding this, it would be appreciated.


#2

you could always try listening to the browsers resize event https://developer.mozilla.org/en-US/docs/Web/Events/resize


#3

I am sorry but do you realise this question is specifically for Mac build.
I don’t think what you suggested would work in native environment, or would it ?


#4

It’s the app is still being run in a webkit view so all browser events and more are still available.


#5

Well that’s a good news. Thanks a ton brother.


#6

@phero_constructs
I tried doing this , but none of the way seems to work.

window.addEventListener is not a function.

Let me know if you know what should be done to make it work


#7

How about

‘’’
window.onresize = function() {
// Do something.
}
‘’’


#8

tried it.
doesnt’ trigger. :confused: