Closed Helgiii closed 3 years ago
most mobile devices nowadays have high dpi screens, any chances this problem could be fixed? or at least some hints where to watch and try fix it myself..
looks like I'll have to rewrite all gui I have in my app to not use haxeui, or switch to unity
Hi, sorry, this seems to have slipped through the net somewhat... does Toolkit.scale
have any effect? What does Screen.instance.dpi
return?
Hi, thanx for pointing out those params, just checked them on a device and screen dpi is: 288 toolkit scale: 2
Does playing with the scale have any decent effect? Like, what would be a "good" value for example?
I was testing on Meizu m6 note smartphone, and Screen.instance.dpi was 288 there but physically (in specs) the device has 403 ppi. By the way are those terms used properly here? (no confusion?) ok I'll try chaning, playing with those parameters
Toolkit.init(); Toolkit.scale = 1;//solves the problem
so I guess the autoScaleDPIThreshold and autoscale in general is a work in progress or some test code nyah? thanx, we can close this:)
Im not sure this should be closed. It seems something isnt working correctly with the autoscale feature, so, to understand, when you have dpi of 288 the UI is too big? Or too small?
game contents (the whole picture) seemed 2x upscaled (zoomed in). looking though the code back then I saw that dpi was 288 which is more than autoScaleDPIThreshold(160), and thus autoscale got turned on and was equal to 2..
Android, Chrome and Firefox
I tried to add this test wnd using mere this.addChild (need to inherit from Sprite) - works and looks fine everywhere. And then with haxeui
With haxeui it works ok in desktop browser, and as I said appears cut and zoomed-in in mobile browser (with high density screen). Alarm!))))