diff --git a/rhythmblock.lua b/rhythmblock.lua index c2a66e1..bc365f0 100644 --- a/rhythmblock.lua +++ b/rhythmblock.lua @@ -19,12 +19,17 @@ else end end if driveCount > 1 then - print("Too many disk drives. Specify where the disk drive is with the argument -d") + print("Too many disk drives. Specify where the disk drive is by running Rhythmblock with the argument") os.exit() end end -status = "" +defaultStatus = "Rhythmblock 0.0.1a" +invalidFormatStatus = "Not a music disc" +noDiscStatus = "No disc" +notPlayingStatus ="No disc playing" +noDiscInDriveStatus = "No disc in drive" +status = defaultStatus function playDisc() @@ -33,26 +38,31 @@ function playDisc() status = disk.getAudioTitle(drive) playing = true elseif disk.isPresent(drive) then - print "Not a music disc" + status = "Not a music disc" else - print "No disc" + print("No disc") end end function ejectDisc() disk.eject() - end function stopDisc() if playing == true then disk.stopAudio() - status = "Rhythmblock 0.0.1a" + playing = 0 + status = defaultStatus else status = "No disc is playing" end end function renderPlayButton() - paintutils.drawFilledBox(centerWidth - 5, centerHeight - 5, centerWidth + 5, centerHeight + 5 accentColor) -end + 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) +end + +renderPlayButton()