Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. os.loadAPI("Apis/DesignUtil")
  2. os.loadAPI("Apis/AccountSytem")
  3. os.loadAPI("Apis/windowSystem")
  4. DesignUtil.setDesign("whiteLightGray")
  5.  
  6. local background,topBar =DesignUtil.getDesign()
  7. local window =windowSystem.createWindow("Completed",2,2,48,16,false)
  8.  
  9. local button=
  10. {
  11.     text="Setup completed, start using your Device";
  12.     x=4;
  13.     y=5;
  14.     W=40;
  15.     H=1;
  16.  
  17. }
  18.  
  19.     paintutils.drawImage(background,1,1)
  20.     windowSystem.drawWindow(window)
  21.  
  22.     function registerClick(x,y)
  23.           if x >= button.x and x <= button.x + button.W - 1 and y >= button.y and y <=  button.y + button.H then
  24.             shell.run("OSCore/loginUtil")
  25.     end
  26. end
  27. while true do
  28.  
  29.  
  30.     term.setBackgroundColor(colors.white)
  31.     term.setCursorPos(button.x,button.y)
  32.     print(button.text)
  33.  
  34.          event, button, xPos, yPos = os.pullEvent("mouse_click")
  35.          registerClick(xPos,yPos)
  36.    
  37.  
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement