Guest User

Untitled

a guest
May 23rd, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.56 KB | None | 0 0
  1. -------------------------------------
  2. -- Code generated by DKR QT to Lua 0.1.7 --
  3. -- Source: login.ui --
  4. -- Date:  23/05/2012 - 19:10:38 --
  5. -------------------------------------
  6.  
  7. function build_window()
  8.    
  9.     local gui = {}
  10.     gui._placeHolders = {}
  11.    
  12.     local screenWidth, screenHeight = guiGetScreenSize()
  13.     local windowWidth, windowHeight = 554, 480
  14.     local left = screenWidth/2 - windowWidth/2
  15.     local top = screenHeight/2 - windowHeight/2
  16.     gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Form", false)
  17.     guiWindowSetSizable(gui["_root"], false)
  18.    
  19.     gui["label_2"] = guiCreateLabel(10, 55, 71, 21, "Parola:", false, gui["_root"])
  20.     guiSetFont(gui["label_2"], "default-bold-small")
  21.     guiLabelSetHorizontalAlign(gui["label_2"], "left", false)
  22.     guiLabelSetVerticalAlign(gui["label_2"], "center")
  23.    
  24.     gui["label"] = guiCreateLabel(10, 25, 71, 21, "Utilizator:", false, gui["_root"])
  25.     guiSetFont(gui["label"], "default-bold-small")
  26.     guiLabelSetHorizontalAlign(gui["label"], "left", false)
  27.     guiLabelSetVerticalAlign(gui["label"], "center")
  28.    
  29.     gui["lineEdit"] = guiCreateEdit(100, 25, 151, 20, "", false, gui["_root"])
  30.     guiEditSetMaxLength(gui["lineEdit"], 32767)
  31.    
  32.     gui["lineEdit_2"] = guiCreateEdit(101, 55, 151, 20, "", false, gui["_root"])
  33.     guiEditSetMaxLength(gui["lineEdit_2"], 32767)
  34.    
  35.     gui["checkBox"] = guiCreateCheckBox(20, 85, 141, 17, "Retine informatiile", false, false, gui["_root"])
  36.     guiSetFont(gui["checkBox"], "default-bold-small")
  37.    
  38.     gui["pushButton"] = guiCreateButton(10, 115, 75, 23, "Logare", false, gui["_root"])
  39.     guiSetFont(gui["pushButton"], "default-bold-small")
  40.     if on_pushButton_clicked then
  41.         addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false)
  42.     end
  43.    
  44.     gui["pushButton_2"] = guiCreateButton(90, 115, 105, 23, "Creaza un cont", false, gui["_root"])
  45.     guiSetFont(gui["pushButton_2"], "default-bold-small")
  46.     if on_pushButton_2_clicked then
  47.         addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false)
  48.     end
  49.    
  50.     gui["pushButton_3"] = guiCreateButton(200, 115, 138, 23, "Recupereaza parola", false, gui["_root"])
  51.     guiSetFont(gui["pushButton_3"], "default-bold-small")
  52.     if on_pushButton_3_clicked then
  53.         addEventHandler("onClientGUIClick", gui["pushButton_3"], on_pushButton_3_clicked, false)
  54.     end
  55.    
  56.     gui["tabWidget"] = guiCreateTabPanel(10, 145, 531, 321, false, gui["_root"])
  57.    
  58.     gui["tab"] = guiCreateTab("Stiri", gui["tabWidget"])
  59.    
  60.     gui["plainTextEdit"] = guiCreateMemo(10, 10, 501, 271, "Serverul este in versiunea 0.1 Alpha", false, gui["tab"])
  61.    
  62.     gui["tab_2"] = guiCreateTab("Informatii", gui["tabWidget"])
  63.    
  64.     gui["plainTextEdit_2"] = guiCreateMemo(10, 10, 501, 271, "Features:\nMySQL System\nAccount system", false, gui["tab_2"])
  65.    
  66.     gui["tab_3"] = guiCreateTab("Statistici", gui["tabWidget"])
  67.    
  68.     gui["plainTextEdit_3"] = guiCreateMemo(10, 10, 501, 271, "Jucatori inregistrati:", false, gui["tab_3"])
  69.    
  70.     return gui, windowWidth, windowHeight
  71. end
  72.  
  73. function on_pushButton_clicked(button, state, absoluteX, absoluteY)
  74.     if (button ~= "left") or (state ~= "up") then
  75.         return
  76.     end
  77.    
  78.     --TODO: Implement your button click handler here
  79.    
  80. end
  81.  
  82. function on_pushButton_2_clicked(button, state, absoluteX, absoluteY)
  83.     if (button ~= "left") or (state ~= "up") then
  84.         return
  85.     end
  86.    
  87.     --TODO: Implement your button click handler here
  88.    
  89. end
  90.  
  91. function on_pushButton_3_clicked(button, state, absoluteX, absoluteY)
  92.     if (button ~= "left") or (state ~= "up") then
  93.         return
  94.     end
  95.    
  96.     --TODO: Implement your button click handler here
  97.    
  98. end
  99.  
  100. -- End of DKR QT to Lua code --
Advertisement
Add Comment
Please, Sign In to add comment