+ result changes, language and sub text

This commit is contained in:
RealFD 2021-10-22 18:11:51 +02:00
parent 57cc23a413
commit 75ce0e6a5e
8 changed files with 277 additions and 20 deletions

View File

@ -7,11 +7,28 @@
}, },
"separator_a": {}, "separator_a": {},
"MSG": {
"type": "text",
"label": "Message (max 8 characters)",
"default": "Hellooooooo"
},
"separator_b": {},
"Animations": {"type": "label"}, "Animations": {"type": "label"},
"animations_affectWithBPM": { "animations_affectWithBPM": {
"type": "bool", "type": "bool",
"label": "Affect speed of some animations with the current song's BPM", "label": "Affect speed of some animations with the current song's BPM",
"default": false "default": false
},
"separator_c": {},
"words": {
"type": "selection",
"label": "Language",
"default": "EN",
"values": ["EN", "DE", "test", "test2"]
} }
} }

39
scripts/language/DE.lua Normal file
View File

@ -0,0 +1,39 @@
--TitleScreen
local lang = {
Challanges = {
--righside
ch = "Idk",
ch1 = "Foltere dich selbst :)",
},
Multiplayer = {
--righside
mp = "Warte, es gibt Mehrspieler???",
mp2 = "Ja, aber niemand ist jemals online",
},
Start = {
--righside
st = "Starte scheisse idk",
st2 ="Spiel etwas bla bla bla\nMit Zeilenumbrüchen",
--leftside
st3 = "Start",
sc = "Drehen",
desc = "Test description. Blah blah blah",
},
Nautica = {
--righside
dls = "Mehr Lieder herunterladen",
dls2 = "ksm.dev",
},
Settings = {
--righside
se = "Dinge anpassen",
se1= "Einstellungen öffnen",
},
Exit = {
--righside
ex = "Verlass dieses verfluchte Spiel",
ex2 = "Komm schon, drück den Knopf!\nDu weißt, dass du es tun willst",
},
}
return lang

39
scripts/language/EN.lua Normal file
View File

@ -0,0 +1,39 @@
--TitleScreen
local lang = {
Challanges = {
--righside
ch = "Idk",
ch1 = "Torture yourself :)",
},
Multiplayer = {
--righside
mp = "Wait, there's multiplayer???",
mp2 = "Yes, but nobody is ever online",
},
Start = {
--righside
st = "Play shit idk",
st2 = "Play something blah blah blah blah\nWith newlines",
--leftside
st3 = "Start",
sc = "Scroll",
desc = "Test description. Blah blah blah",
},
Nautica = {
--righside
dls = "Download more songs",
dls2 = "ksm.dev",
},
Settings = {
--righside
se = "Adjust things",
se1= "Open settings",
},
Exit = {
--righside
ex = "Leave this cursed game",
ex2 = "C'mon press that button!\nYou know you want to do it",
},
}
return lang

19
scripts/language/call.lua Normal file
View File

@ -0,0 +1,19 @@
local call = nil
local EN = require("language.EN")
local DE = require("language.DE")
local test = require("language.test")
local test2 = require("language.test2")
if game.GetSkinSetting('words') == "EN" then
call = EN
elseif game.GetSkinSetting('words') == "DE" then
call = DE
elseif game.GetSkinSetting('words') == "test" then
call = test
elseif game.GetSkinSetting('words') == "test2" then
call = test2
end
return call

40
scripts/language/test.lua Normal file
View File

@ -0,0 +1,40 @@
--TitleScreen
--These are the templates for more Languages
local lang = {
Challanges = {
--righside
ch = " ",
ch1 = " ",
},
Multiplayer = {
--righside
mp = " ",
mp2 = " ",
},
Start = {
--righside
st = " ",
st2 = " ",
--leftside
st3 = " ",
sc = " ",
desc = " ",
},
Nautica = {
--righside
dls = " ",
dls2 = " ",
},
Settings = {
--righside
se = " ",
se1= " ",
},
Exit = {
--righside
ex = " ",
ex2 = " ",
},
}
return lang

View File

@ -0,0 +1,40 @@
--TitleScreen
--These are the templates for more Languages
local lang = {
Challanges = {
--righside
ch = " ",
ch1 = " ",
},
Multiplayer = {
--righside
mp = " ",
mp2 = " ",
},
Start = {
--righside
st = " ",
st2 = " ",
--leftside
st3 = " ",
sc = " ",
desc = " ",
},
Nautica = {
--righside
dls = " ",
dls2 = " ",
},
Settings = {
--righside
se = " ",
se1= " ",
},
Exit = {
--righside
ex = " ",
ex2 = " ",
},
}
return lang

View File

@ -83,7 +83,9 @@ local clearBadgeImages = {
-- ANIMS -- ANIMS
local idolAnimation = gfx.LoadSkinAnimation('idol', 1 / 30, 0, true); local idolAnimation = gfx.LoadSkinAnimation('idol', 1 / 30, 0, true);
-- added new
local RightPanelAni = gfx.LoadSkinAnimation("result/diagonalanims", 1 / 30, 0, true)
--
local transitionEnterScale = 0; local transitionEnterScale = 0;
local idolAnimTransitionScale = 0; local idolAnimTransitionScale = 0;
@ -103,6 +105,7 @@ local BOTTOM_PANEL_TRANSTION_ENTER_OFFSET = 256;
local highScore; local highScore;
local username = game.GetSkinSetting('username'); local username = game.GetSkinSetting('username');
local msg = game.GetSkinSetting("MSG");
local earlyLateBarsStats = { local earlyLateBarsStats = {
earlyErrors = 0, earlyErrors = 0,
@ -197,6 +200,25 @@ local drawIdol = function(deltaTime)
end end
end end
--added code
local drawRightBarAni = function(deltaTime)
local idolAnimTickRes = gfx.TickAnimation(RightPanelAni, deltaTime);
if idolAnimTickRes == 1 then
gfx.GlobalAlpha(idolAnimTransitionScale);
idolAnimTransitionScale = idolAnimTransitionScale + 1 / 60;
if (idolAnimTransitionScale > 1) then
idolAnimTransitionScale = 1;
end
local tw, th = gfx.ImageSize(RightPanelAni);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1080 - tw, rightPanelY + 5, tw * 1,
th * 1, RightPanelAni, 1, 0);
end
end
--
local drawTopBar = function() local drawTopBar = function()
gfx.BeginPath(); gfx.BeginPath();
local tw, th = gfx.ImageSize(topBarImage); local tw, th = gfx.ImageSize(topBarImage);
@ -226,10 +248,48 @@ local drawRightPanelContent = function()
if (result.autoplay) then if (result.autoplay) then
badgeImage = clearBadgeImages[7]; -- Display AUTOPLAY badge badgeImage = clearBadgeImages[7]; -- Display AUTOPLAY badge
end end
local tw, th = gfx.ImageSize(badgeImage); if badgeImage == clearBadgeImages[1] then -- Adjustments CRASH
gfx.BeginPath(); local tw, th = gfx.ImageSize(badgeImage);
gfx.ImageRect(rightPanelX + 1140 - tw, rightPanelY - 10, tw * 0.85, gfx.BeginPath();
th * 0.85, badgeImage, 1, 0); gfx.ImageRect(rightPanelX + 970 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[2] then -- Adjustments CRASH
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 970 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[3] then -- Adjustments COMP
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1090 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[4] then -- Adjustments COMP
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1090 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[5] then -- Adjustments UC
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1150 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[6] then -- Adjustments PUC
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1080 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
if badgeImage == clearBadgeImages[7] then -- Adjustments AUTOPLAY
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX + 1080 - tw, rightPanelY - 10, tw * 0.85,
th * 0.85, badgeImage, 1, 0);
end
-- Draw song name and artist -- Draw song name and artist
gfx.FontSize(28) gfx.FontSize(28)
@ -416,7 +476,7 @@ local drawBottomPanelContent = function(deltatime)
gfx.FontSize(22) gfx.FontSize(22)
gfx.LoadSkinFont('Digital-Serial-Bold.ttf') gfx.LoadSkinFont('Digital-Serial-Bold.ttf')
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE) gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
gfx.Text('Hellooooooo', bottomPanelX + 190, bottomPanelY + 282); gfx.Text(msg, bottomPanelX + 190, bottomPanelY + 282);
-- Draw username -- Draw username
gfx.FontSize(28) gfx.FontSize(28)
@ -624,6 +684,7 @@ render = function(deltaTime, showStats)
drawBottomPanelContent(deltaTime) drawBottomPanelContent(deltaTime)
drawRightPanel() drawRightPanel()
drawRightBarAni(deltaTime)
drawRightPanelContent() drawRightPanelContent()
drawJacketPanel() drawJacketPanel()

View File

@ -3,6 +3,8 @@ require('common')
local Footer = require('components.footer'); local Footer = require('components.footer');
local Background = require('components.background'); local Background = require('components.background');
local lol = require("language.call")
local cursorIndex = 3; local cursorIndex = 3;
local buttonHeight = 128 + 16; local buttonHeight = 128 + 16;
@ -48,11 +50,10 @@ game.LoadSkinSample('titlescreen/bgm.wav');
game.LoadSkinSample('titlescreen/cursor_change.wav'); game.LoadSkinSample('titlescreen/cursor_change.wav');
game.LoadSkinSample('titlescreen/cursor_select.wav'); game.LoadSkinSample('titlescreen/cursor_select.wav');
local selectorDescriptionLabel = gfx.CreateLabel( local selectorDescriptionLabel = gfx.CreateLabel(lol.Start.desc , 22, 0);
'Test description. Blah blah blah', 22, 0);
local selectorLegendScrollLabel = gfx.CreateLabel('Scroll', 20, 0); local selectorLegendScrollLabel = gfx.CreateLabel(lol.Start.sc , 20, 0);
local selectorLegendSelectLabel = gfx.CreateLabel('START', 20, 0); local selectorLegendSelectLabel = gfx.CreateLabel(lol.Start.st3 , 20, 0);
local scrollTransitionScale = 1; -- Goes from 0 to 1 when transition is happening, sits at 1 when it's not. local scrollTransitionScale = 1; -- Goes from 0 to 1 when transition is happening, sits at 1 when it's not.
local buttonsMovementScale = 0; -- Basically same as `scrollTransitionScale` but with a +/- sign for the scroll direction and goes from 1 to 0 local buttonsMovementScale = 0; -- Basically same as `scrollTransitionScale` but with a +/- sign for the scroll direction and goes from 1 to 0
@ -232,27 +233,28 @@ function setButtons()
if buttons == nil then if buttons == nil then
buttons = {} buttons = {}
buttons[1] = { buttons[1] = {
skillLabelImage, 412, Menu.Challenges, "Idk", "Torture yourself :)" skillLabelImage, 412, Menu.Challenges,
lol.Challanges.ch, lol.Challanges.ch1
} }
buttons[2] = { buttons[2] = {
friendLabelImage, 169, Menu.Multiplayer, friendLabelImage, 169, Menu.Multiplayer,
"Wait, there's multiplayer???", "Yes, but nobody is ever online" lol.Multiplayer.mp, lol.Multiplayer.mp2
} }
buttons[3] = { buttons[3] = {
normalLabelImage, 210, Menu.Start, "Play shit idk", normalLabelImage, 210, Menu.Start,
"Play something blah blah blah blah\nWith newlines" lol.Start.st, lol.Start.st2
} }
buttons[4] = { buttons[4] = {
nauticaLabelImage, 230, Menu.DLScreen, "Download more songs", nauticaLabelImage, 230, Menu.DLScreen,
"ksm.dev" lol.Nautica.dls, lol.Nautica.dls2
} }
buttons[5] = { buttons[5] = {
settingsLabelImage, 247, Menu.Settings, "Adjust things", settingsLabelImage, 247, Menu.Settings,
"Open settings" lol.Settings.se, lol.Settings.se1
} }
buttons[6] = { buttons[6] = {
exitLabelImage, 110, Menu.Exit, "Leave this cursed game", exitLabelImage, 110, Menu.Exit,
"C'mon press that button!\nYou know you want to do it" lol.Exit.ex, lol.Exit.ex2
} }
end end
end end