Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function calc_color(color)
- return math.pow(2, color - 1)
- end
- function msg(gap, line, color, groundb, text)
- term.setBackgroundColor(calc_color(groundb))
- term.setCursorPos(gap,line)
- term.setTextColor(calc_color(color))
- text = term.write(text)
- end
- term.setBackgroundColor(32768)
- term.clear()
- msg(09,03,09,16,"Language-Selection - Sprachauswahl")
- msg(09,04,09,16,"~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~")
- msg(13,08,01,15," ") msg(29,08,01,15," ")
- msg(13,09,01,15," ") msg(29,09,01,15," ")
- msg(13,10,01,15," English ") msg(29,10,01,15," Deutsch ")
- msg(13,11,01,15," ") msg(29,11,01,15," ")
- msg(13,12,01,15," ") msg(29,12,01,15," ")
- local event, button, X, Y = os.pullEvent("mouse_click")
- if X >= 13 and X <= 23 and Y >= 8 and Y <= 12 then
- file = fs.open("local_language" , "w")
- file.write("EN")
- file.close()
- shell.run("Category_EN")
- elseif X >= 29 and X <= 39 and Y >= 8 and Y <= 12 then
- file = fs.open("local_language" , "w")
- file.write("DE")
- file.close()
- shell.run("Category_DE")
- else
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment