List Option
Introduction
ListOption
cycles through a list of values, providing interactive selection.
Constructor
ListOption(String name, Supplier<T> getter, Consumer<T> setter, List<T> values)
Behavior
Click: Left-click advances, right-click reverses through the list.
Render: Shows the option's name and current value with distinct coloring.
Example
Ensure that the getter is synchronized with the setter; otherwise, the option will enter a soft lock, and the value will not update. (Meaning the getter and setter are updating the same variables or referencing the same variable)
Last updated
Was this helpful?