so, ive been messing about with open peripherals. but i have a small issue, this might just be my coding. first time ever programming something on computercraft lol.
anyways, the issue is. im running a loop on both the monitor and glasses bridge or whatever. but on the ui the box i added glitches out. its like the box sometimes gets added after the text or the other way im not sure lol. to better understand, check out this picture...
Script Source:
anyways, the issue is. im running a loop on both the monitor and glasses bridge or whatever. but on the ui the box i added glitches out. its like the box sometimes gets added after the text or the other way im not sure lol. to better understand, check out this picture...
Script Source:
Code:
net = peripheral.wrap("left")
bridge = peripheral.wrap("bottom")
--methods = net.callRemote("me_access_terminal_2","listMethods")
local t = "me_access_terminal_2"
while true do
-- variables
totalbytes = net.callRemote(t,"getTotalBytes")
usedbytes = net.callRemote(t,"getUsedBytes")
freebytes = net.callRemote(t,"getFreeBytes")
local m = peripheral.wrap("top")
m.setCursorPos(2,1)
m.setTextScale(1)
m.write("ME Storage Status")
m.setCursorPos(4,2)
m.write(freebytes.." Bytes free of "..totalbytes.." Bytes")
--m.setCursorPos(1,3)
--m.write("Used Bytes: "..usedbytes)
--x,y,width,height,color,opacity
bridge.addBox(4,4,100,20,0x000000,0.7)
fb = bridge.addText(5,5,"LOADING...",0xFFFFFF)
fb.setText(freebytes.." Bytes free of "..totalbytes.." Bytes")
sleep(0.5)
m.clear() -- clear monitor
bridge.clear() -- clear OPglasses
end