27 lines
524 B
Lua
27 lines
524 B
Lua
|
|
||
|
local bannerBaseImage = gfx.CreateSkinImage("gameplay/banner/base.png", 0)
|
||
|
|
||
|
local BANNER_W = 1080;
|
||
|
local BANNER_H = 368;
|
||
|
|
||
|
|
||
|
local render = function (deltaTime)
|
||
|
-- 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
|
||
|
}
|