1
0
Fork 0
mirror of https://fem.mint.lgbt/m/Rhythmblock.git synced 2024-08-14 20:27:11 +00:00

fix button render (i'm an idiot)

This commit is contained in:
mint 2021-05-07 00:48:14 -04:00
parent 8835535dba
commit d17f78e679

View file

@ -10,7 +10,7 @@ end
width, height = term.getSize()
centerWidth = round(width / 2)
centerHeight = round(width / 2)
centerHeight = round(height / 2)
peripherals = peripheral.getNames()
playing = false
if #peripherals < 0 then
@ -38,8 +38,7 @@ noDiscInDriveStatus = "No disc in drive"
status = defaultStatus
function playDisc()
if disk.isPresent(drive) and disk.hasAudio(drive) then
if disk.isPresent(drive) and disk.hasAudio(drive) then
disk.playAudio(drive)
status = disk.getAudioTitle(drive)
playing = true
@ -65,10 +64,10 @@ function stopDisc()
end
function renderPlayButton()
paintutils.drawFilledBox(centerWidth - 3, centerHeight - 4, centerWidth + 2, centerHeight + 2, accentColor)
-- paintutils.drawLine(centerWidth - 2, centerHeight - 3, centerWidth - 2, centerHeight + 1, buttonColor)
-- paintutils.drawLine(centerWidth - 1, centerHeight - 2, centerWidth - 1, centerHeight, buttonColor)
-- paintutils.drawPixel(centerWidth + 1, centerHeight)
paintutils.drawFilledBox(centerWidth - 4, centerHeight - 4, centerWidth + 5, centerHeight + 3, accentColor)
paintutils.drawFilledBox(centerWidth - 2, centerHeight - 3, centerWidth - 1, centerHeight + 1, buttonColor)
paintutils.drawFilledBox(centerWidth, centerHeight - 2, centerWidth + 1, centerHeight - 1, buttonColor)
paintutils.drawPixel(centerWidth, centerHeight - 2, buttonColor)
end
playDisc()