Skip to content

Commit

Permalink
version 2.1
Browse files Browse the repository at this point in the history
[fixed] play rate will no longer fluxuate (will probably add a feature where the crank adjusts this)
[changed] design of "now playing" screen looks a lot better
[changed] readme.md now contains a section on how to sideload playdate games
  • Loading branch information
Aiden committed Aug 31, 2022
1 parent 18280bc commit 6d50640
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ a music player for playdate

## FAQ

### So how do I get this onto my Playdate?
Visit [this page](https://help.play.date/games/sideloading/) on Playdate's website for information on how to sideload.

### Why though?
There are no public music players out for playdate yet (except for Audition, but it wasn't made to be a music player), so I decided to make one.

Expand Down
Binary file modified src/SystemAssets/card-pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function playdate.update()
screenMode = 1
else
if string.find(files[curRow],"%.mp3") ~= nil or string.find(files[curRow],"%.pda") ~= nil then
currentAudio:setRate(1.0)
for i=1,#files do
if string.find(files[curRow],"%.mp3") ~= nil or string.find(files[curRow],"%.pda") ~= nil then
table.insert(audioFiles,files[i])
Expand Down Expand Up @@ -217,8 +218,9 @@ function playdate.update()
gfx.setImageDrawMode(dMColor1)
audioLen = currentAudio:getLength()
if audioLen ~= nil then
gfx.drawTextInRect(currentFileName,0,0,400,240,nil,nil,kTextAlignment.center,nil)
gfx.drawTextInRect(currentFileName,0,110,400,240,nil,nil,kTextAlignment.center,nil)
gfx.drawTextInRect((formatSeconds(currentAudio:getOffset()).." / "..formatSeconds(audioLen)),0,220,400,20,nil,nil,kTextAlignment.center,nil)
gfx.drawLine(0,10,400,10)
else
gfx.drawTextInRect("nothing playing",0,220,400,20,nil,nil,kTextAlignment.center,nil)
end
Expand All @@ -241,8 +243,8 @@ function playdate.update()

local size = gfx.getTextSize(batteryPercent.."%",dosFnt)

dosFnt:drawTextAligned(time["hour"]..":"..time["minute"],0,0,400,20,kTextAlignment.left,nil)
dosFnt:drawTextAligned(batteryPercent.."%",400-size,0,400,20,kTextAlignment.right,nil)
dosFnt:drawTextAligned(time["hour"]..":"..time["minute"],1,1,400,20,kTextAlignment.left,nil)
dosFnt:drawTextAligned(batteryPercent.."%",401-size,1,400,20,kTextAlignment.right,nil)
gfx.drawTextInRect(modeString,0,220,400,20,nil,nil,kTextAlignment.right,nil)
gfx.setImageDrawMode(dMColor2)

Expand Down
4 changes: 2 additions & 2 deletions src/pdxinfo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name=musik
author=nanobot567
description=simple music player for playdate
bundleID=com.nano.musik
version=2.0
buildNumber=493
version=2.1
buildNumber=494
imagePath=SystemAssets

0 comments on commit 6d50640

Please sign in to comment.