-- Nastaveni monitoru mon = peripheral.wrap("right") -- Nastaveni barvy function setColor(name) -- Prevod textove hodnoty barvy na ciselnou if name == "white" then color = colors.white elseif name == "orange" then color = colors.orange elseif name == "lightBlue" then color = colors.lightBlue elseif name == "yellow" then color = colors.yellow elseif name == "lime" then color = colors.lime elseif name == "purple" then color = colors.purple elseif name == "blue" then color = colors.blue elseif name == "green" then color = colors.green elseif name == "red" then color = colors.red else color = colors.white end -- Zmena barvy mon.setTextColor(color) end -- Nastav velikost pisma function setScale(scale) mon.setTextScale(scale) end -- Vypis textu function echo(text, colorName) -- Nastaveni barvy, pokud je vybrana if color ~= nil then setColor(colorName) end -- Vypis textu mon.write(text) end -- Smaz monitor function clear() mon.clear() end -- Smaz monitor clear() mon.setTextScale(4) echo("Ahoj", "blue")