haxegon
haxegon copied to clipboard
different layouts on flash/html5/neko
html5, looks the same whenever I resize the window (scales everything properly):
flash, umm...
neko, note the g overlapping the box
and when I resize the window everything goes nuts
i guess it's the case that html5 has a virtual canvas that nicely resizes everything, whereas flash/neko don't?
(c++ one is similar to the others also)
this isn't very important for me, but thought I'd mention it because you asked me to :P
project here: http://ded.increpare.com/~locus/cardgamebug2.zip
Thank you!
I have no idea what’s going on here, but I’ll get to the bottom of it!
Probably related to this: I can confirm that I also experience some odd scaling behaviour when I set windowheight (in project.xml) to be greater than my actual max screen height (e.g. windowheight = 860, while my screen is 1366x768).
Also worth of note is that it seems that Gfx.screenwidth/height subtracts the window chrome-decorations size (the space taken up by window borders/title/menu) in that situation.
Trying to explain it better using the attached haxegon_screenheight.zip example (which also uses Gfx.resizescreen(0, 0) between "before" and "after" - as the test code provided by @increpare):
- my screen is 1366x768
- in project.xml it sets windowwidth to 840 and windowheight to 860
- in init()
- store Gfx.screenwidth/height (BEFORE)
- call Gfx.resizescreen(0, 0)
- store Gfx.screenwidth/height (AFTER)
Then I get these results:
| target | ORIG_WIN (windowwidth/height) | BEFORE (screenwidth/height) | AFTER (screenwidth/height) |
|---|---|---|---|
| html5 | 840x860 | 840x860 | 840x860 |
| neko | 840x860 | 840x860 | 840x741 |
| flash | 840x860 | 840x860 | 840x721 |
Side note: Calling Gfx.resize(840, 860, true) results in no text being drawn for flash & neko
Thanks, @azrafe7!
I'm about to dive into 7drl, so probably not doing much on Haxegon this week. Will have this figured out for 0.13.0, though!