Crank Indicator doesn't show up when using setBackgroundDrawingCallback

Platform: Windows 11

Using the following code.

local backgroundImage = gfx.image.new("images/background_01")
gfx.sprite.setBackgroundDrawingCallback(
    function(x, y, width, height)
        backgroundImage:draw(0, 0)
    end
)

The background shows fine.

When I add following code to playdate.update

if pd.isCrankDocked() then
    pd.ui.crankIndicator:update()
end

The indicator doesn't show up. If I remove the setBackgroundDrawingCallback line, the indicator shows fine.

Does this help?

3 Likes

That does. Thank you! I tried looking for a similar issue but I don't know how I missed this one.

1 Like