Marlingaming

WWN Menu Manager

Apr 16th, 2021 (edited)
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. --The Purpose of this script is to Draw, Load Data, and manage Menu
  2. local Apps = {}
  3. local colors = require "colors"
  4. local component = require "component"
  5. local gpu = component.gpu
  6. gpu.fill(1, 1, 10, 10, " ")
  7. function GatherFiles()
  8.     CheckApps()
  9. end
  10. function DrawScreen()
  11.     local x = 1
  12.     local y = 1
  13.     local i = 0
  14.     if i < Apps.length, i++ then
  15.        
  16.         if x < 5 then
  17.            x = x + 1
  18.         else
  19.             x = 1
  20.             y = y + 1
  21.         end
  22.     end
  23. end
  24. function CheckApps()
  25.     local h = fs.open("AppList", fs.exists("AppList"),"r")
  26.     local i = 0
  27.     repeat
  28.         Apps(i) = h.readLine()
  29.         i = i + 1
  30.     until (i = 20)
  31.     h.close()
  32. end
Add Comment
Please, Sign In to add comment