https://kotlinlang.org logo
Title
k

kirillrakhman

06/05/2020, 8:20 AM
how do I set the window size when using a module?
r

RezMike

06/05/2020, 8:24 AM
yep, you should override
size
property in Module
k

kirillrakhman

06/05/2020, 8:24 AM
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

Deactivated User

06/05/2020, 10:06 AM
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

Nico

06/05/2020, 10:08 AM
Yep. But not in the next hours :(
d

Deactivated User

06/05/2020, 10:09 AM
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

Nico

06/07/2020, 8:58 AM
That’ll be tonight then
👍 1