Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glasses=peripheral.wrap("left")
- sensor=peripheral.wrap("right")
- --local currentPlayer=nil
- local currentPlayer="darkbobo00"
- local guiSize="normal"
- local guiSizes={
- ["small"]={["x"]=1920,["y"]=1057},
- ["normal"]={["x"]=960,["y"]=540},
- ["large"]={["x"]=640,["y"]=353},
- --["auto"]={["x"]=,["y"]=},
- }
- local screenX=0
- local screenY=0
- function setScreenSize(guiSize,x,y)
- if guiSize==nil then
- screenX=x
- screenY=y
- return true,screenX,screenY
- else
- screenX=guiSizes[guiSize]["x"]
- screenY=guiSizes[guiSize]["y"]
- return true,screenX,screenY
- end
- return false
- end
- local function drawBackground()
- glasses.clear()
- backgroundBox=glasses.addBox(0,0,screenX,screenY,0xff0000,0.2)
- glasses.addBox(0,0,screenX,10,0x000000,255)
- glasses.addBox(0,screenY-10,10,screenY,0x000000,255)
- glasses.addBox(screenX-10,0,10,screenY,0x000000,255)
- glasses.addBox(0,0,10,screenY,0x000000,255)
- end
- local function drawSituation(player)
- local allData=sensor.getPlayerData(player)
- local x=screenX*0.1
- local y=screenX*0.4
- healthBox=glasses.addBox(x-3,y-3,x+6,y+6,0x000000,0.2)
- healthBox=glasses.addBox(x,y,x,y/2,0xff0000,0.2)
- end
- function systemBoot()
- setScreenSize(guiSize)
- drawBackground()
- drawSituation(currentPlayer)
- end
- systemBoot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement