mobile version

hikari89

New member
Jan 27, 2022
2
0
1
#1
Hello, I tried the game from mobile, but the windows are bigger than the width or the height of the screen depending on the orientation of the device.

Is it possible to add an input[type=range] to scale the html body (using for example the css transform: scale(var(--value-of-the-input-range)); ) or eventually change the meta viewport so it is possible to scale the UI in mobile?

The code of the meta viewport is this currently this:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=no">

Is it possible to give it a try? Resizing the window a little could make the mobile version work better.
 

hikari89

New member
Jan 27, 2022
2
0
1
#2
ps: I tried to scale the body but it didn't work, not even with the code:

var zoom_xx = 1;
var width_xx = 100;

function bigger() {
zoom_xx = zoom_xx + 0.1;
width_xx = 100 / zoom_xx;
document.body.style.transformOrigin = "left top";
document.body.style.transform = "scale(" + zoom_xx + ")";
document.body.style.width = width_xx + "%";
}
function smaller() {
zoom_xx = zoom_xx - 0.1;
width_xx = 100 / zoom_xx;
document.body.style.transformOrigin = "left top";
document.body.style.transform = "scale(" + zoom_xx + ")";
document.body.style.width = width_xx + "%";
}

(I leave it here in case anyone can find an use for it)

the only option left I have is to change the viewport (I'll think of another solution too, I'd like this game to work better)
 
Top Bottom