Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w, h = term.getSize()
- -- Function to center text horizontally
- local function centerText(y, text)
- local x = math.floor((w - #text) / 2)
- term.setCursorPos(x, y)
- term.write(text)
- end
- -- ASCII art dog image
- local dogImage = {
- " |\\_/| ",
- " | @ @ Doggy OS ",
- " | <> _ ",
- " | _/\\------____ ((| |))",
- " | `--' | ",
- " _____|_ ___| |___.' ",
- "/_/_____/____/_______| "
- }
- -- Function to draw the ASCII art
- local function drawASCIIArt(y, textColor)
- term.setTextColor(textColor)
- for i, line in ipairs(dogImage) do
- centerText(y + i - 1, line)
- end
- end
- -- Function to display the "Insert bootable medium" message
- local function insertBootableMediumMessage()
- local message = "Insert bootable medium"
- local messageY = h - 5 -- Move the message higher (adjusted position)
- while true do
- term.setBackgroundColor(colors.black)
- term.clear()
- -- Draw the ASCII art
- drawASCIIArt(math.floor((h - #dogImage) / 2), colors.white)
- -- Center and display the message
- centerText(messageY, message)
- -- Wait briefly before clearing and redrawing
- os.sleep(1)
- end
- end
- -- Main program
- insertBootableMediumMessage()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement