haxegon icon indicating copy to clipboard operation
haxegon copied to clipboard

different layouts on flash/html5/neko

Open increpare opened this issue 7 years ago • 3 comments
trafficstars

html5, looks the same whenever I resize the window (scales everything properly):

bildschirmfoto 2018-03-04 um 01 16 26

flash, umm...

bildschirmfoto 2018-03-04 um 01 16 20

neko, note the g overlapping the box

bildschirmfoto 2018-03-04 um 01 18 52

and when I resize the window everything goes nuts

bildschirmfoto 2018-03-04 um 01 19 22

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

increpare avatar Mar 04 '18 01:03 increpare

Thank you!

I have no idea what’s going on here, but I’ll get to the bottom of it!

TerryCavanagh avatar Mar 04 '18 01:03 TerryCavanagh

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

haxegon_screenheight.zip

Side note: Calling Gfx.resize(840, 860, true) results in no text being drawn for flash & neko

azrafe7 avatar Mar 04 '18 22:03 azrafe7

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!

TerryCavanagh avatar Mar 05 '18 11:03 TerryCavanagh