Add a functionality that allow user to define a custom function in the form of FnOnce(u32) -> bool to determine when the credits will be re-filled automatically. The function will have no effect if the credit mode is not Auto. A default function that re-fills the credit at half of the total credit will be provided.
Add a functionality that allow user to define a custom function in the form of
FnOnce(u32) -> bool
to determine when the credits will be re-filled automatically. The function will have no effect if the credit mode is notAuto
. A default function that re-fills the credit at half of the total credit will be provided.