negamartin

gOS Default Launcher

Feb 4th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. --gOS Default Launcher
  2. local color=colors.lightBlue;
  3.  
  4. function redrawLauncher()
  5.     term.setBackgroundColor(color);
  6.     term.clear();
  7.     if color==colors.lightBlue then color=colors.lime;
  8.     else color=colors.lightBlue; end
  9.     term.setCursorPos(1,1);
  10.     term.setBackgroundColor(colors.white);
  11.     term.clearLine();
  12. end
  13.  
  14. redrawLauncher();
  15. while true do
  16.     local ev={os.pullEvent()};
  17.     if ev[1]=="mouse_click" then
  18.         redrawLauncher();
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment