Commit 4d989e4d authored by Anton V. Boyarshinov's avatar Anton V. Boyarshinov

non 4:3 or 16:9 resolutions support

parent e20902d8
......@@ -5,19 +5,25 @@ fun imgscale( image, scale )
image.Scale( image.GetWidth() * scale, image.GetHeight() * scale );
}
fun imgscale2( image, scaleX, scaleY )
{
image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY );
}
# background
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{
logo.raw = Image("background16x9.png");
logo.image = imgscale( logo.raw, Window.GetWidth()/logo.raw.GetWidth() );
}
else
{
logo.raw = Image("background4x3.png");
logo.image = imgscale( logo.raw, Window.GetWidth()/logo.raw.GetWidth() );
}
logo.sprite = Sprite(logo.image);
logo.image = imgscale2( logo.raw,
Window.GetWidth()/logo.raw.GetWidth(),
Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
#----------------------------------------- Dialogue --------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment