MPhil

Untitled

Sep 7th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. local gui = {}
  2.  
  3. function createShoppingWindow()
  4.     outputChatBox("test")
  5.     local sWidth, sHeight =  guiGetScreenSize()
  6.    
  7.     local Width, Height =  320, 550
  8.     local X = (sWidth/2) - (Width/2)
  9.     local Y = (sHeight/2) - (Height/2)
  10.    
  11.     gui["_root"] = guiCreateWindow(X, Y, Width, Height, "24/7 Shop", false)
  12.     gui["grid"] = guiCreateGridList(1,1, 318, 500, true, gui["_root"])
  13.     gui["close"] = guiCreateButton(80, 505, 160, 40, "Schliessen", true, gui["_root"])
  14.    
  15.     guiGridListAddColumn(gui["grid"], "Artikel", 0.5)
  16.     guiGridListAddColumn(gui["grid"], "Preis ($)", 0.5)
  17.    
  18.     showCursor(true)
  19.     guiSetVisible(gui["_root"], true)
  20. end
  21.  
  22. addEvent("onCall", true)
  23. addEventHandler("onCall", getRootElement(), createShoppingWindow)
  24.  
  25. function btnClose(btn, state)
  26.     if (btn == "left") and (state == "up") then
  27.         guiSetVisible(gui["_root"], false)
  28.         showCursor(false)
  29.     end
  30. end
  31.  
  32. addEventHandler("onClientGUIClick", gui["close"], btnClose, false))
Advertisement
Add Comment
Please, Sign In to add comment