--Developed by Makerimages
os.loadAPI("/apis/gameutils");--Load the animation api by NitrogenFingers
term.setTextColor(colors.lightGray)
local topBar=gameutils.loadSprite("/graphics/TopBar.nfp",1,1);--top bar
local w, h=term.getSize();
local loadBar=gameutils.loadAnimation("/graphics/LoadingBar.nfa",math.ceil(w/2-3),math.ceil(h/2));--loading bar
local backGround=gameutils.loadSprite("/graphics/b.nfp",1,1)--background
local addAccountButton=
{
text="+ Add an account";
x=w/2-5;
y=h/2;
w=16;
h=1;
}
loadBar.currentFrame=1;
gameutils.initializeBuffer();
gameutils.writeToBuffer(backGround)
gameutils.writeToBuffer(topBar);
gameutils.writeToBuffer(loadBar);
gameutils.drawBuffer();
while loadBar.currentFrame<=10 do
loadBar:next();
sleep(0.15)
gameutils.writeToBuffer(loadBar);
gameutils.drawBuffer();
term.setCursorPos(math.ceil(w/2-3),math.ceil(h/2)-1)
print("OS One is booting...")
end
if fs.exists("userData/user1.uData") then
shell.run("/OSCore/loginScreen.lua")
else
gameutils.clearBuffer()
gameutils.writeToBuffer(backGround)
gameutils.writeToBuffer(topBar);
while true do
gameutils.drawBuffer();
term.setCursorPos(1,math.ceil(h/2-5))
print("OS One has identified that you do not have an admininstrative user Account set up yet. Please do so now.")
term.setCursorPos(addAccountButton.x, addAccountButton.y)
write("|")write(addAccountButton.text)write("|")
event, button, x, y = os.pullEvent("mouse_click")
if x >= addAccountButton.x and x <= addAccountButton.x + addAccountButton.w - 1 -- minus 1 because of how the coordinate system works
and y >= addAccountButton.y and y <= addAccountButton.y + addAccountButton.h - 1 then
shell.run("id")
end
sleep(0.15)
end
end
the problem lies in the lower part-the while true loop, basically my mouse clicks do not work. Any ideas?












