Hi. I made a build of a game with FlashDevelop for html5. Since the images are 1920x1080, in the Chrome browser it appears cut to 2/3 cause too large when tested but also when hosted it’s the same.
https://imgur.com/yx86rUf
I tried using some codes to rescale the screen but nothing changed it. So in my Main.hx
These are just try outs so nothing has to be like that.
public function SetScreen()
{
if (Lib.current.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE )
{
//Lib.current.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
var currentWindowWidth : Float;
var currentWindowHeight : Float;
var widthRatio : Float;
var heightRatio : Float;
//check window height and width and calculate ratio
currentWindowWidth = Lib.current.stage.stageWidth;
currentWindowHeight = Lib.current.stage.stageHeight;
widthRatio = currentWindowWidth / 1920;
heightRatio = currentWindowHeight / 960; //makes no difference what i set here
stage.scaleX = widthRatio;
stage.scaleY = heightRatio;
}
I also edited project.xml to set width and height to 0 but nothing changed. I resize without resizing all buttons and stuff I hope?