displayio_effects.fluctuation_effect

Add the fluctuation effect to your widgets

  • Author(s): Alec Delaney

Implementation Notes

Software and Dependencies:

displayio_effects.fluctuation_effect.hook_fluctuation_effect(widget_class, value_name)

Adds the fluctuation effect for the given class

Parameters
  • widget_classes – The widgets that should have this effect hooked into them.

  • value_name (str) – The name of the attribute that sets the “value” for this widget

For example, to hook this into the Dial widget, you would use the following code:

from displayio_dial import Dial
from displayio_effects import fluctuation_effect

fluctuation_effect.hook_fluctuation_effect(Dial, "value")
displayio_effects.fluctuation_effect.update_fluctuation(self)

Updates the widget value and propagates the fluctuation effect refresh