Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- sustava = {
- {1,2,3,4,5,6,7,8,9,0, colors.lime}, --[1][x]
- {1,2,3,4,5,6,7,8,9,0, colors.red}, --[2][x]
- {1,2,3,4,5,6,7,8,9,0, colors.magenta}, --[3][x]
- {1,2,3,4,5,6,7,8,9,0, colors.yellow}, -- [4][x]
- {1,2,3,4,5,6,7,8,9,0, colors.gray},
- }
- m = peripheral.wrap("right")
- x, y = 1000, 1000
- repeat
- m.setBackgroundColor(colors.lightGray)
- m.clear()
- m.setBackgroundColor(colors.blue)
- m.setCursorPos(x, y)
- m.write(" ")
- m.setBackgroundColor(colors.lightGray)
- m.setCursorPos(1, 1)
- w, h = m.getSize()
- stability = {0, 10, 20, 30, 40}
- for loop=1, 2 do
- for k,v in pairs(sustava) do
- m.setTextColor(sustava[k][11])
- for i,p in pairs(v) do
- if i < 11 then
- if loop == 2 then
- m.setCursorPos(1, i+stability[k])
- end
- if (i+stability[k]) == y and loop == 2 then
- m.setBackgroundColor(colors.lightBlue)
- end
- if (i+stability[k]) == x and loop == 1 then
- m.setBackgroundColor(colors.lightBlue)
- end
- m.write(tostring(math.ceil(p)))
- m.setBackgroundColor(colors.lightGray)
- end
- end
- end
- end
- m.setCursorPos(26, h)
- m.write(" "..x.." "..y)
- _, _, x, y = os.pullEvent("monitor_touch")
- m.setCursorPos(26, h)
- m.write(" "..x.." "..y)
- x, y = tonumber(x), tonumber(y)
- sleep(0)
- if #tArgs > 0 then
- break
- end
- until nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement