33 lines
765 B
Lua
33 lines
765 B
Lua
local resx,resy = game.GetResolution()
|
|
local desw = 1080
|
|
local desh = 1920
|
|
|
|
local bgSfxPlayed = false;
|
|
|
|
local backgroundImage = gfx.CreateSkinImage("bg.png", 1);
|
|
game.LoadSkinSample("result")
|
|
|
|
function resetLayoutInformation()
|
|
resx, resy = game.GetResolution()
|
|
desw = 1080
|
|
desh = 1920
|
|
scale = resx / desw
|
|
end
|
|
|
|
render = function(deltaTime, showStats)
|
|
resetLayoutInformation()
|
|
|
|
gfx.ImageRect(0, 0, desw, desh, backgroundImage, 0.5, 0);
|
|
gfx.Scale(scale,scale)
|
|
|
|
if not bgSfxPlayed then
|
|
game.PlaySample("result", true)
|
|
bgSfxPlayed = true
|
|
end
|
|
if game.GetButton(game.BUTTON_STA) then
|
|
game.StopSample("result")
|
|
end
|
|
if game.GetButton(game.BUTTON_BCK) then
|
|
game.StopSample("result")
|
|
end
|
|
end |