mutiny icon indicating copy to clipboard operation
mutiny copied to clipboard

Resize Canvas Does Not Work

Open johnjelinek opened this issue 12 years ago • 3 comments

I think this means that the canvas will resize with the browser window, is this correct?

johnjelinek avatar Jul 14 '13 15:07 johnjelinek

Currently it is hard coded to 800x600 in src/mutiny/Application.cpp.

I will add a Screen::setResolution shortly which will enable you to set your own resolution. As for automatically re-sizing the canvas, I might have to have a look at what flexibility Emscripten's SDL wrapper gives me. I am not sure if it actually sends resize events yet.

osen avatar Jul 14 '13 22:07 osen

Ok, thanks for the update. Is that what Resize Canvas was supposed to mean: Auto-resize on window resize?

johnjelinek avatar Jul 14 '13 23:07 johnjelinek

Screen::setResolution(int width, int height, bool fullscreen, int preferredRefreshRate) will now set the HTML canvas size when running in a web browser (or the window size when running as an .exe)

Note: fullscreen and preferredRefreshRate are currently ignored.

osen avatar Jul 16 '14 16:07 osen