Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speaker = peripheral.find("speaker")
- local monitor = peripheral.find("monitor")
- monitor.setTextScale(0.5)
- local width, height = monitor.getSize()
- print(width, height)
- --Intended for 18x19 (36x38 textScale)
- local wScale, hScale = math.max(width / 36, 0.5), math.max(height/38, 0.5)
- local oScale = math.min(wScale, hScale)
- local nearestHeight = math.floor(width / 1.5, 0)
- local xScale = 1 --width / nearestHeight
- print(nearestHeight)
- term.redirect(monitor)
- local function drawPlayButton(x, y, even)
- if even then
- x = math.floor(x)
- paintutils.drawFilledBox(x-math.floor(math.floor(1 * wScale) * xScale), y-math.floor(1 * wScale), x+math.floor(math.floor(2 * wScale) * xScale), y+math.floor(1 * wScale), colors.white)
- else
- x = math.ceil(x)
- paintutils.drawFilledBox(x-math.floor(math.floor(1 * wScale) * xScale), y-math.floor(1 * wScale), x+math.floor(math.floor(1 * wScale) * xScale), y+math.floor(1 * wScale), colors.white)
- end
- --paintutils.drawLine(x-2, y-4, x+2, y-4, colors.white)
- --paintutils.drawLine(x-3, y-3, x+3, y-3, colors.white)
- --paintutils.drawLine(x-4, y-2, x+4, y-2, colors.white)
- --paintutils.drawLine(x-4, y-1, x+4, y-1, colors.white)
- --paintutils.drawLine(x-2, y+4, x+2, y+4, colors.white)
- --paintutils.drawLine(x-3, y+3, x+3, y+3, colors.white)
- --paintutils.drawLine(x-4, y+2, x+4, y+2, colors.white)
- --paintutils.drawLine(x-4, y+1, x+4, y+1, colors.white)
- end
- local function drawArrows(colour1, colour2)
- monitor.setTextScale(0.5)
- --Arrow Left
- paintutils.drawLine(2, 47, 11, 43, colour1)
- paintutils.drawLine(2, 47, 11, 51, colour1)
- --Arrow Right
- paintutils.drawLine(56, 47, 46, 43, colour2)
- paintutils.drawLine(56, 47, 46, 51, colour2)
- end
- local function setUp()
- monitor.setBackgroundColor(colors.black)
- monitor.clear()
- drawPlayButton(width/2, height - 2 * math.floor(wScale), width%2 == 0)
- end
- setUp()
- speaker.playSound("minecraft:music_disc.pigstep")
Advertisement
Add Comment
Please, Sign In to add comment