+ title screen to titlescreen (fuck)

This commit is contained in:
FajsiEx 2021-12-21 19:39:34 +01:00
parent 634c85436c
commit ae7b9d8824
4 changed files with 41 additions and 1 deletions

View File

@ -1,4 +1,5 @@
local splashScreen = require('titlescreen.splash');
local titleScreen = require('titlescreen.title');
local modeSelectScreen = require('titlescreen.mode_select');
local serviceScreen = require('titlescreen.service');
@ -6,6 +7,9 @@ local screens = {
splash = {
screen = splashScreen
},
title = {
screen = titleScreen
},
mode_select = {
screen = modeSelectScreen
},

View File

@ -22,7 +22,7 @@ render = function (deltaTime)
splashTimer = 5;
return {
eventType = 'switch',
toScreen = 'mode_select'
toScreen = 'title'
}
end
end

View File

@ -0,0 +1,36 @@
local splash1Image = gfx.CreateSkinImage('titlescreen/title/background.png', 0);
local triggerModeSelect = false;
-- game.LoadSkinSample('titlescreen/splash/splash1.wav');
-- local splash1SfxPlayed = false;
local render = function (deltaTime)
gfx.BeginPath();
gfx.ImageRect(0, 0, 1080, 1920, splash1Image, 1, 0);
-- if (not splash1SfxPlayed) then
-- splash1SfxPlayed = true;
-- game.PlaySample('titlescreen/splash/splash1.wav');
-- end
if (triggerModeSelect) then
triggerModeSelect = false;
return {
eventType = 'switch',
toScreen = 'mode_select'
}
end
end
local onButtonPressed = function(button)
if button == game.BUTTON_STA then
triggerModeSelect = true;
end
end
return {
render = render,
onButtonPressed = onButtonPressed
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 KiB