login.render = function() -- render func.
if login.thiscategory == 1 then
playVideo (0, 0, screenW, screenH, "https://www.youtube.com/embed/rRjY8SOZ9Uo?autoplay=1&showinfo=0&rel=0&controls=0&disablekb=1", 12500, true, false)
--dxDrawImage(0, 0, screenW, screenH, ":ac-logowanie/i/tlo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(sw(750), sh(10), sw(400), sh(400),'logo.png', 0, 0, 0, tocolor(255, 255, 255, 255), false)
showChat (false)
if getElementData(localPlayer,"notshowhud") then return end
dxDrawText('♫ Aktualnie: Miami Nights 1984 - Accelerated',sw(80),sh(1045),sw(1000),sh(1000),white,0.8,fonts.medium)
local bit_low = getSoundFFTData(sound,512,230)
for i,v in pairs(bit_low) do
elo = math.min(v*120,50)
end
dxDrawImage(0,0,sx,sy,'light.png',0,0,0,tocolor(255,255,255,elo))
dxDrawRectangle(sw(1),sh(1079),sw(15) ,-elo ,tocolor(255,255,255),false)
local bit_mid = getSoundFFTData(sound,1024,230)
for i,v in pairs (bit_mid) do
elo = math.min(v*120,50)
dxDrawRectangle(sw(18),sh(1079),sw(15) , -elo ,tocolor(255,255,255),false)
end
local bit_top = getSoundFFTData(sound,2048,230)
for i,v in pairs (bit_top) do
elo = math.min(v*120,50)
dxDrawRectangle(sw(35),sh(1079),sw(15) , -elo,tocolor(255,255,255),false)
end
local Pos_x,Pos_y = login.obrazki_poses[random].x,login.obrazki_poses[random].y
--dxDrawImage(0, 0, screenW, screenH, ":ac-logowanie/i/tlo.png", 0, 0, 0, tocolor(255, 255, 255, f), false)
local f=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-login.thisTick)/10000, "Linear")
local x=interpolateBetween(-100, 0, 0, 0, 0, 0, (getTickCount()-login.thisTick)/30000, "OutQuad")
-- dxDrawRectangle(0, 0, screenW, screenH, tocolor(255,255,255), false)
dxDrawImage(sw(Pos_x+x), sh(Pos_y+x), sw(1920), sh(1080), texture, 0, 0, 0, tocolor(255, 255, 255, f), false)
if getTickCount()-login.thisTick >= 20000 then
login.thisTick = getTickCount()
-- random_new = login.obrazki[math.random(1,#login.obrazki)][1]
next_image()
end
elseif login.thiscategory == 2 then
playVideo (0, 0, screenW, screenH, "https://www.youtube.com/embed/rRjY8SOZ9Uo?autoplay=1&showinfo=0&rel=0&controls=0&disablekb=1", 12500, true, false)
--dxDrawImage(0, 0, screenW, screenH, ":ac-logowanie/i/tlo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
local Pos_x,Pos_y = login.obrazki_poses[random].x,login.obrazki_poses[random].y
--dxDrawImage(0, 0, screenW, screenH, ":ac-logowanie/i/tlo.png", 0, 0, 0, tocolor(255, 255, 255, f), false)
local f=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-login.thisTick)/10000, "Linear")
local x=interpolateBetween(-100, 0, 0, 0, 0, 0, (getTickCount()-login.thisTick)/30000, "OutQuad")
-- dxDrawRectangle(0, 0, screenW, screenH, tocolor(255,255,255), false)
dxDrawImage(sw(Pos_x+x), sh(Pos_y+x), sw(1920), sh(1080), texture, 0, 0, 0, tocolor(255, 255, 255, f), false)
if getTickCount()-login.thisTick >= 90500 then
login.thisTick = getTickCount()
-- random_new = login.obrazki[math.random(1,#login.obrazki)][1]
next_image()
end
elseif login.thiscategory == 3 then
playVideo (0, 0, screenW, screenH, "https://www.youtube.com/embed/rRjY8SOZ9Uo?autoplay=1&showinfo=0&rel=0&controls=0&disablekb=1", 12500, true, false)
--dxDrawImage(0, 0, screenW, screenH, ":ac-logowanie/i/tlo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
if anim_type == "start" then
f=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-login.ticks)/500, "OutQuad")
f_219=interpolateBetween(0, 0, 0, 219, 0, 0, (getTickCount()-login.ticks)/500, "OutQuad")
--local x=interpolateBetween(-1000, 0, 0, 0, 0, 0, (getTickCount()-login.ticks)/1000, "OutQuad")
x=0
elseif anim_type == "end" then
f=interpolateBetween(255, 0, 0, 0, 0, 0, (getTickCount()-login.ticks)/500, "OutQuad")
f_219=interpolateBetween(219, 0, 0, 0, 0, 0, (getTickCount()-login.ticks)/500, "OutQuad")
--local x=interpolateBetween(-1000, 0, 0, 0, 0, 0, (getTickCount()-login.ticks)/1000, "OutQuad")
x=0
if getTickCount() > login.ticks+500 then
login.ticks = getTickCount()
anim_type = "start"
anim_function()
end
end