brian.uicontrol
- UiEventsListenerAlreadyClosedError
- LedColor
- ButtonId
- LedButtonAnimation
- set_button_led
- enable_knob_rotation_animation
UiEventsListenerAlreadyClosedError class objects
Thrown when trying to access closed UiEventsListener
LedColor class objects
__init__
Holds color definition for UI LEDs. Color values range from 0 to 255. When outside of this range, the values are clamped
red
Red component of the color, in range from 0 to 255. When set to a value outside of this range, the value is clamped
green
Green component of the color, in range from 0 to 255. When set to a value outside of this range, the value is clamped
blue
Blue component of the color, in range from 0 to 255. When set to a value outside of this range, the value is clamped
ButtonId class objects
TOP_LEFT
TOP_RIGHT
BOTTOM_LEFT
BOTTOM_RIGHT
KNOB
LedButtonAnimation class objects
Constants for selecting behavior of button LEDs. Only in use when LED animations are handled by Brian OS.
OFF
LED is fully off
STANDBY
LED is pulsing at low brightness level
SELECTABLE
LED is pulsing at medium brightness level
SELECTED
LED is pulsing at high brightness level
set_button_led
@staticmethod
def set_button_led(target: Union[ButtonId, UiEventsListener.Button,
UiEventsListener.Knob],
animation: LedButtonAnimation,
color: LedColor = 'DEFAULT_COLOR_FROM_SETTINGS') -> None
Set desired animation and color for a specific button (target). These settings override the animation requested
by the PhysButtonOverlay
and the default os button effect, unless LedButtonAnimation._inherit
is used.
Arguments:
target
: Target button to change color. When Using UiEventsListener.any_button and UiEventsListener.any_button_incl_knob, all respective buttons change color/animation.animation
: Target animation.color
: Target color. When unfilled default color from settings is used.