Potentially misleading crank alert/indicator documentation

,

SDK 1.10.0 - Linux

Hi all,

I am not sure if this is supposed to go in the #get-help section or here amongst the bug reports. I decided that it should go here because the documentation on the surface seems misleading.

Looking at the crank alert section in the 1.10.0 documentation, it states:

The crank alert will disappear once you stop calling :update()

However, when I stop calling the update method, the update of the alert stops (as indicated by the 'highlight screen updates' feature of the simulator), but the crank indicator image itself does not disappear. I believe a manual clear screen or clear that section of the screen is required to be implemented, but that is not indicated in the documentation.

I used the following code below to validate this. It's a simple hello world example that allows the crank indicator update to be invoked with the press of the A button.

import "CoreLibs/graphics"
import "CoreLibs/ui"
import "CoreLibs/timer"

local show = false
playdate.ui.crankIndicator:start()

function playdate.AButtonDown()
    show = not show
end

function playdate.update()
    playdate.graphics.drawText("Hello World!", 50, 50)

    if show then
        print(" ")
        playdate.ui.crankIndicator:update()
    else
        print("Not showing")
    end

    playdate.timer.updateTimers()
end

I'm happy to be told that I'm wrong or the code is incorrect. Otherwise if this is how it's supposed to work, I would argue that the documentation needs to be clearer.

Thanks in advance.

2 Likes

Thanks for the report, and sorry for the late reply--things are pretty busy over here. :slight_smile: I've got this in the bug tracker now, and we'll get it fixed as soon as we can!

1 Like