--[[
@StoriesRPG
@Author: Quick <gamesadrian@onet.pl>
@Copryight
@All rights reserved!
]]
local sw, sh=guiGetScreenSize()
local w, h=(sw/1680), (sh/1050)
local font = dxCreateFont("f.ttf", 20*w)
local font2 = dxCreateFont("f.ttf", 10*w)
local tick=getTickCount()
local tick2=getTickCount()
local menuf1=false
local bg=false
local info=false
local pomoc=false
local premium=false
local aktualizacje=false
local updates={}
--[Wypelnienie zakladek]
local infotresc=[[
edsaewsd
]]
local pomoctresc=[[
df112
]]
local premiumtresc=[[
sdadas
]]
local aktualizacjetresc=[[
dsad
]]
--[end:wyeplnieniezakladek]
addEvent("client:showUpdates", true)
addEventHandler("client:showUpdates", root, function(tabelka)
updates = tabelka
end)
function isMouseIn( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
addEventHandler("onClientRender", getRootElement(), function()
if bg then
exports["srpg-blurr"]:dxDrawBluredRectangle(0, 0, sw, sh, tocolor( 220, 220, 220, a2), false)
local a2=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-tick2)/500, "Linear")
dxDrawImage(196*w, 144*h, 1280*w, 720*h, "i/background.png", 0, 0, 0, tocolor(255, 255, 255, a2), false)
end
a = interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-tick)/500, "Linear")
if menuf1 then
if isMouseIn(459*w, 492*h, 64*w, 132*h) then
dxDrawImage(459*w, 492*h, 64*w, 132*h, "i/icons/icon_info.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
else
dxDrawImage(459*w, 492*h, 64*w, 132*h, "i/icons/icon_info.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if isMouseIn(656*w, 492*h, 95*w, 132*h) then
dxDrawImage(656*w, 492*h, 95*w, 132*h, "i/icons/icon_help.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
else
dxDrawImage(656*w, 492*h, 95*w, 132*h, "i/icons/icon_help.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if isMouseIn(882*w, 492*h, 110*w, 128*h) then
dxDrawImage(882*w, 492*h, 110*w, 128*h, "i/icons/icon_premium.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
else
dxDrawImage(882*w, 492*h, 110*w, 128*h, "i/icons/icon_premium.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if isMouseIn(1106*w, 492*h, 118*w, 122*h) then
dxDrawImage(1106*w, 492*h, 118*w, 122*h, "i/icons/icon_updates.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
else
dxDrawImage(1106*w, 492*h, 118*w, 122*h, "i/icons/icon_updates.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
dxDrawText("Informacje", 415*w, 624*h, 578*w, 664*h, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, false, false)
dxDrawText("Pomoc", 623*w, 624*h, 786*w, 664*h, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, false, false)
dxDrawText("Premium", 858*w, 620*h, 1021*w, 660*h, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, false, false)
dxDrawText("Aktualizacje", 1085*w, 614*h, 1248*w, 654*h, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, false, false)
end
if info then
dxDrawText(infotresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if pomoc then
dxDrawText(pomoctresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if premium then
dxDrawText(premiumtresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
if aktualizacje then
dxDrawText(aktualizacjetresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
end)
addEventHandler("onClientClick", getRootElement(), function(btn,state)
if btn ~= "left" and state ~= "down" then return end
if isMouseIn(459*w, 492*h, 64*w, 132*h) and menuf1 == true then
tick=getTickCount()
menuf1=false
info=true
wroc=true
elseif isMouseIn(656*w, 492*h, 95*w, 132*h) and menuf1 == true then
tick=getTickCount()
menuf1=false
pomoc=true
wroc=true
elseif isMouseIn(882*w, 492*h, 110*w, 128*h) and menuf1 == true then
tick=getTickCount()
menuf1=false
premium=true
wroc=true
elseif isMouseIn(1106*w, 492*h, 118*w, 122*h) and menuf1 == true then
tick=getTickCount()
triggerServerEvent("f1:showUpdates", localPlayer)
menuf1=false
aktualizacje=true
wroc=true
end
if wroc and btn == "left" and state == "down" then
if isMouseIn(793*w, 784*h, 95*w, 90*h) then
tick=getTickCount()
info=false
pomoc=false
premium=false
aktualizacje=false
wroc=false
menuf1=true
end
end
end)
bindKey("f1", "down", function()
if not getElementData(localPlayer,"player:logged") then return end
if bg == false then
showChat(false)
tick=getTickCount()
tick2=getTickCount()
bg=true
menuf1=true
showCursor(true)
else
showChat(true)
menuf1=false
wroc=false
info=false
pomoc=false
premium=false
bg=false
aktualizacje=false
showCursor(false)
end
end)