Posted 29 April 2017 - 05:45 PM
Bug:
Hello, the auto refresh of my program does not work (It does not automatically update)
My code:
Hello, the auto refresh of my program does not work (It does not automatically update)
Hello, the auto refresh of my program does not work (It does not automatically update)
My code:
ReactorName = "BigReactors-Reactor"
Nom = "Mon reactor"
NomColor = colors.yellow
BackGroundColor = colors.lightGray
InfoColor = colors.gray
ecran = peripheral.wrap("monitor_0")
machine = peripheral.find(ReactorName)
print("Loading...")
sleep(1)
print("Systeme by trafgan")
while true do
ecran.setBackgroundColor(BackGroundColor)
ecran.clear()
ecran.setCursorPos(17.5, 1)
ecran.setTextColor(NomColor)
ecran.write(Nom)
ecran.setCursorPos(1, 5)
ecran.setTextColor(InfoColor)
ecran.write("Energie Stockee: "..machine.getEnergyStored().." Rf")
ecran.setCursorPos(1, 6)
ecran.write("Energie par tick: "..machine.getEnergyProducedLastTick().." Rf/T")
ecran.setBackgroundColor(colors.red)
ecran.setCursorPos(9, 12)
ecran.setTextColor(colors.white)
ecran.write("Eteindre")
ecran.setBackgroundColor(colors.green)
ecran.setCursorPos(1, 12)
ecran.setTextColor(colors.white)
ecran.write("Allumer")
event, side, x, y = os.pullEvent("monitor_touch")
if x > 1 and x < 7 and y == 12 then
ecran.clear()
machine.setActive(true)
end
if x > 9 and x < 17 and y == 12 then
ecran.clear()
machine.setActive(false)
end
sleep(0.2)
end
Hello, the auto refresh of my program does not work (It does not automatically update)