Posted 23 February 2013 - 12:00 PM
Ok, so im trying to add a background which can be customized to my new OS by mouse_click event but idk how to change the original coding or red to say blue with one mouse click. I tried true statements I/O statements and i just don't know how to do it. Here is the code its to the desktop of FireBallOS.
I just want the background that can be changed green blue yellow grey red orange and purple. I just cant seem to do it…
term.setBackgroundColor(colors.red)
term.clear()
term.setCursorPos(1,1)
print(" -------- ------- -------- [Fire]")
print("[ File ] [ Shock ] [ Disk ] [Wolf]")
print("[ Browser] [Browser] [ namer ]")
print(" -------- ------- -------- ")
while true do
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
if XY == "1,1" then
shell.run("fb")
elseif XY == "2,1" then
shell.run("fb")
elseif XY == "3,1" then
shell.run("fb")
elseif XY == "4,1" then
shell.run("fb")
elseif XY == "5,1" or XY == "6,1" or XY == "7,1" or XY == "8,1" or XY == "9,1" or XY == "10,1" then
shell.run("fb")
elseif XY == "1,2" or XY == "2,2" or XY == "3,2" or XY == "4,2" or XY == "5,2" or XY == "6,2" or XY == "7,2" or XY == "8,2" or XY == "9,2" or XY == "10,2" then
shell.run("fb")
elseif XY == "1,3" or XY == "2,3" or XY == "3,3" or XY == "4,3" or XY == "5,3" or XY == "6,3" or XY == "7,3" or XY == "8,3" or XY == "9,3" or XY == "10,3" then
shell.run("fb")
elseif XY == "1,4" or XY == "2,4" or XY == "3,4" or XY == "4,4" or XY == "5,4" or XY == "6,4" or XY == "7,4" or XY == "8,4" or XY == "9,4" or XY == "10,4" then
shell.run("fb")
elseif XY == "17,1" or XY == "18,1" or XY == "19,1" or XY == "20,1" or XY == "21,1" or XY == "22,1" or XY == "23,1" or XY == "24,1" or XY == "25,1" or XY == "17,2" or XY == "18,2" or XY == "19,2" or XY == "20,2" or XY == "21,2" or XY == "22,2" or XY == "23,2" or XY == "24,2" or XY == "25,2" or XY == "17,3" or XY == "18,3" or XY == "19,3" or XY == "20,3" or XY == "21,3" or XY == "22,3" or XY == "23,3" or XY == "24,3" or XY == "25,3" or XY == "17,4" or XY == "18,4" or XY == "19,4" or XY == "20,4" or XY == "21,4" or XY == "22,4" or XY == "23,4" or XY == "24,4" or XY == "25,4" then
shell.run("shockbrowser")
shell.run("desktop")
end
end
I just want the background that can be changed green blue yellow grey red orange and purple. I just cant seem to do it…