Resolution Change in Html5

Monkey Forums/Monkey Programming/Resolution Change in Html5

Tibit(Posted 2014) [#1]
There was added something to hook into resolution changes for html5 right?

Before I had my own quick-fix for this.

Anyone got a good updated more "proper" solution for this? Any pointers? Examples? Any sections of the docs related to this?

What I want is for my html5-version to be "refreshed" each time resolution changes so I can update GUI/gamelogic that depend on screen-width.


Tibit(Posted 2014) [#2]
While tips are still welcome, I realize my problem was I had version v77b instead of v77c for some reason!

There is now an:

Method OnResize : Int ()

End

In the App class, which is called and DeviceHeight & DeviceWidth should automatically update! :)


nikoniko(Posted 2014) [#3]
Did you see file Monkey/targets/html5/templates/main.js ?


nikoniko(Posted 2014) [#4]
nikoniko
Did you see file Monkey/targets/html5/templates/main.js ?



nikoniko(Posted 2014) [#5]
.


nikoniko(Posted 2014) [#6]
.


nikoniko(Posted 2014) [#7]
.


MikeHart(Posted 2014) [#8]
nikoniko, what are you trying to do?


nikoniko(Posted 2014) [#9]
Sorry. it's a bug in the firefox extension for monkey's forum - sometimes send fake posts. Now fixed.


time-killer-games(Posted 2014) [#10]
lol that was interesting.