Guest User

Untitled

a guest
Jul 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.94 KB | None | 0 0
  1. function initGUI()
  2.   -- loader
  3.   GUI.loader = Gui.image('i/25opacity.png', screen.w/2 - 32, screen.h/2 - 32, 64, 64):alpha(1):data('dx','loader'):hide()
  4.   -- login window
  5.   local w, h = 200, 300
  6.   GUI.window.login = Gui.image('i/0.png', (screen.w-w)/2, (screen.h-h)/2, w, h):alpha(1):hide():data('dx','i/gfx.png')
  7.   local close = Gui.imagebutton('i/close.png', w-36, 4, 32, 32, GUI.window.login):click(function()
  8.     GUI.window.login:popOut({1,0}, 0, GUI.options.closeSpeed, GUI.options.easeIn, function()
  9.       GUI.window.login:destroy()
  10.     end)
  11.   end)
  12.   local title = Gui.label('DDC: Orange', 10, 10, w-60, 30, GUI.window.login):font(font.normal)
  13.   Gui.image('i/hr.png', 0, 37, w, 2, GUI.window.login)
  14.   local footer = Gui.image('i/servercolor.png', 0, 38, w, 64, GUI.window.login):alpha(0.7)
  15.   Gui.image('i/hr.png', 0, 101, w, 2, GUI.window.login)
  16.   local text = Gui.label('Please enter your forum account name (NOT the "displayed username") and password to login:', 10, 10, w-20, 60, footer):font(font.small):align('left', 'top', true)
  17.   local login = Gui.input('Account Name', 10, 110, w-20, 30, GUI.window.login):font(font.normal)
  18.   local pass = Gui.input('Password', 10, 150, w-20, 30, GUI.window.login):font(font.normal):masked(true)
  19.   local remember = Gui.checkbox('Auto-login me by serial', 10, 190, w-20, 20, GUI.window.login):font(font.small):alpha(0.5)
  20.   local submit = Gui.button('Log In', 10, 220, w-20, 30, GUI.window.login):font(font.normal)
  21.   local guest = Gui.button('Play as Guest', 10, 260, w-20, 30, GUI.window.login):font(font.small)
  22.   GUI.window.login:popIn({1,0}, 0.1, GUI.options.openSpeed, GUI.options.easeOut):click(function()
  23.     if GUI.loader:visible() then
  24.       GUI.loader:popOut(1, 0, GUI.options.closeSpeed, GUI.options.easeOut)
  25.     else
  26.       GUI.loader:popIn(1, 0, GUI.options.openSpeed, GUI.options.easeIn)
  27.     end    
  28.   end)
  29.   --
  30.   showCursor(true)
  31. end
  32. addEventHandler('onClientResourceStart', resourceRoot, initGUI)
Add Comment
Please, Sign In to add comment