Color Option

This is an incomplete but sufficient documentation of the ColorOption

Introduction

The ColorOptionclass inherits from the Option<Color> class and allows users select RGBA values via the sliders or the color picker.

Constructor

The color picker constructor takes a "parent" context menu. You have to provide the menu in which you are adding the ColorOption, like inside of a SubMenu or the actual ContextMenu.

You can see an example of this used in the TextWidget class.

ContextMenu menu = new ContextMenu(<parameters>);
menu.addOption(new ColorOption("TextColor", menu, () -> this.textColor, value -> this.textColor = value));

Last updated

Was this helpful?