Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require( "component" )
- local gpu = component.gpu
- local power = component.mekanism_machine
- local event =require( "event" )
- local oldW, oldH = gpu.getResolution()
- gpu.setResolution( 80, 11 )
- function clearScreen()
- local oldColor = gpu.getBackground( false )
- local w,h = gpu.getResolution()
- gpu.setBackground( 0x000000, false )
- gpu fill( 1, 1, w, h, " " )
- gpu.setBackground( oldColor, false )
- end
- function progressBar( label, y, value, maxVal, color, show, unit )
- local oldColor = gpu.getBackground( false )
- gpu.setBackground(0x000000, false)
- gpu.fill( 3, y, 75, 2, " " )
- w = math.foor( value * (75 / maxVal) )
- p = math.floor( (w/75)*100)
- gpu.set(3,y,label..":"..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement