Facebook
From bluur, 1 Week ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 33
  1. --[[
  2. Author: bluur
  3. Server: BlackMTA
  4. Script: Login Panel
  5. ]]
  6.  
  7. --Skalowanie
  8.  
  9. local sx,sh = guiGetScreenSize()
  10. local sx,sh = (1920/sx, 1080/sh)
  11.  
  12. local zoom = 1
  13. local baseX = 1600
  14. local minZoom = 2
  15.  
  16. if sx < baseX then
  17.   zoom = math.min(minZoom, baseX/sx)
  18. end
  19.  
  20. wybrane = "start"
  21. -- Panel
  22.  
  23. function guiPanel()
  24.         if wybrane=="start" then
  25.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/tlo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  26.                 dxDrawImage(960/zoom, 540/zoom, 800/zoom, 800/zoom, ":img/logo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  27.  
  28.         if inMouseIn(960/zoom, 540/zoom, 800/zoom, 800/zoom) then
  29.                 dxDrawImage(960/zoom, 540/zoom, 800/zoom, 800/zoom, ":img/logo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  30.         else
  31.                 dxDrawImage(960/zoom, 540/zoom, 800/zoom, 800/zoom, ":img/logo2.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  32.  
  33.         elseif wybrane== "logowanie" then
  34.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/tlo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  35.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/pass.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  36.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/login.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  37.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/bg.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  38.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/back.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  39.                 dxDrawText("LOGOWANIE", 326/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  40.                 dxDrawText("Nie masz konta? Zarejestruj sie!", 326/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotor, "center", "center", false, false, false, false, false)
  41.                 dxDrawText("Zaloguj sie", 326/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  42.  
  43.         elseif wybrane=="rejestracja" then
  44.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/tlo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  45.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/pass.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  46.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/login.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  47.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/bg.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  48.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/back.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  49.                 dxDrawText("Rejestracja", 0/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  50.                 dxDrawText("Masz konto? Zaloguj sie!", 326/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotor, "center", "center", false, false, false, false, false)
  51.                 dxDrawText("Zarejestruj", 326/zoom, 619/zoom, 531/zoom, 672/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  52.  
  53.         elseif wybrane=="aktualizacje" then
  54.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/tlo.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  55.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/pass.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  56.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/login.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  57.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/bg.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  58.                 dxDrawImage(0/zoom, 0/zoom, 1920/zoom, 1080/zoom, ":img/back.png", 0 ,0 ,0, tocolor(255, 255, 255, 255), false)
  59.                 dxDrawText("Aktualizacje", 0/zoom, 0/zoom, 0/zoom, 0/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  60.                 dxDrawText("1. Aktualizacja", 0/zoom, 0/zoom, 0/zoom, 0/zoom, tocolor(0, 0, 0, 255), 1.00, robotor, "center", "center", false, false, false, false, false)
  61.                 dxDrawText("2. Aktualizacja", 0/zoom, 0/zoom, 0/zoom, 0/zoom, tocolor(0, 0, 0, 255), 1.00, robotol, "center", "center", false, false, false, false, false)
  62.         end
  63. end
  64. end
  65.  
  66. addEventHandler("onClientClick", root, function(btn,state)
  67.     if btn=="left" and state=="down" then
  68.         if isMouseIn(960/zoom, 540/zoom, 800/zoom, 800/zoom) then
  69.            wybor="aktualizacje"
  70.         elseif isMouseIn(960/zoom, 540/zoom, 800/zoom, 800/zoom) then
  71.             wybor="rejestracja"
  72.         elseif isMouseIn(960/zoom, 540/zoom, 800/zoom, 800/zoom) then
  73.             wybor="logowanie"
  74.         end
  75.     end
  76. end)