how do I set the window size when using a module?
# korge
k
how do I set the window size when using a module?
r
yep, you should override
size
property in Module
k
thx
👍 1
what happens when I deploy the game to an android device where the screen has a different aspect ratio? do I get black bars?
on JVM that appears to be the case when I resize the window
d
Thats the default behaviour. But you can change it. There is the concept of: windows size, virtual size, and extended virtual size You define a virtual size with a specific aspect ratio, but when adapting to the window the aspect ratio might change. The default behaviour is to put black bars, but you can disable them and use the dockedTo component (or manually register to resize events) to place stuff in the corners
Nico, do you think you could make a videotutorial showing this? I think this is something better shown than explained
n
Yep. But not in the next hours :(
d
No rush at all! It is just a topic we should cover. I will try to create a page explaining how to deal with different resolutions and aspect ratios so you can explain it at some point in a way that makes sense
👍 2
The minesweeper sample is already not showing blackbars but a background cover + some glowing lights moving
https://korlibs.soywiz.com/korge/resolutions/ In the meantime before Nico creates a video showing this (I will update the page adding the video once available)
n
That’ll be tonight then
👍 1