InteractiveToggle

A menu element that has an attached functional interface hook for the current selected state.

Author

Lucas Bubner, 2024

Since

6.0.0

Constructors

Link copied to clipboard
constructor(@NonNull title: String, def: Boolean, @NonNull executor: (Boolean) -> out Any)
Create a new InteractiveOption.

Functions

Link copied to clipboard
protected open fun getDisplayText(): String
Link copied to clipboard
protected open fun onClick()
Override this to get notified when the element is clicked
Link copied to clipboard
protected open fun onLeftInput()
Override this to get notified when the element gets a "left edit" input
Link copied to clipboard
protected open fun onRightInput()
Override this to get notified when the element gets a "right edit" input
Link copied to clipboard
Sets a supplier that determines whether this option should be returned to default state.
Link copied to clipboard
open fun withColours(@NonNull activeColour: String, @NonNull inactiveColour: String): TelemetryMenu.InteractiveToggle
Set the colours for the active and inactive states of this option.

Inherited functions

Link copied to clipboard
Link copied to clipboard
protected open fun setParent(@NonNull parent: TelemetryMenu.MenuElement)