32 lines
619 B
Lua
32 lines
619 B
Lua
|
|
local bannerBaseImage = gfx.CreateSkinImage("gameplay/banner/base.png", 0)
|
|
|
|
local BANNER_W = 1080;
|
|
local BANNER_H = 368;
|
|
|
|
|
|
local render = function (deltaTime)
|
|
local resx, resy = game.GetResolution();
|
|
if (resx > resy) then
|
|
return
|
|
end
|
|
|
|
-- Get the banner downscaled in whatever resolution it is, while maintaining the aspect ratio
|
|
local tw,th = gfx.ImageSize(bannerBaseImage);
|
|
BANNER_H = th * (1080/tw);
|
|
|
|
gfx.BeginPath();
|
|
gfx.ImageRect(
|
|
0,
|
|
0,
|
|
BANNER_W,
|
|
BANNER_H,
|
|
bannerBaseImage,
|
|
1,
|
|
0
|
|
);
|
|
end
|
|
|
|
return {
|
|
render=render
|
|
} |