Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Version 2.5
- --Made by gunnarlive12
- --Variables
- local dps = 0
- local pxlColor
- local um = false
- --Function
- setColor = function( color )
- pxlColor = color
- end
- setDrawSpeed = function( time )
- dps = time
- end
- setMonitorUse = function( boolean )
- um = boolean
- end
- setMonitor = function( string )
- m = peripheral.wrap( tostring( string ) )
- end
- drawPix = function( x, y )
- if um == false then
- term.setCursorPos( 1, 1 )
- term.setBackgroundColor( pxlColor )
- sleep(dps)
- elseif um == true
- m.setCursorPos( 1, 1 )
- m.setBackgroundColor( pxlColor )
- sleep(dps)
- end
- drawLineX = function( xs, xe, y )
- term.setBackgroundColor( pxlColor )
- if um == false then
- for i = xs, xe do
- term.setCursorPos( i, y )
- term.write( " " )
- sleep(dps)
- end
- elseif um == true then
- for i = xs, xe do
- m.setCursorPos( i, y)
- m.write( " " )
- sleep(dps)
- end
- end
- end
- drawLineY = function( x, ys, ye )
- term.setBackgroundColor( pxlColor )
- for i = ys, ye do
- term.setCursorPos( x, i )
- term.write( " " )
- sleep(dps)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement