DynamicHUD Dev Guide
DownloadNeed Support?
  • Dynamic HUD
  • Import using Gradle
  • Integrating DynamicHUD
    • Integrating DynamicHUD
    • Adding Widgets
    • Adding your own WidgetRenderer
    • Passing AbstractMoveableScreen instance
    • Changing default key bind
    • Changing save and load file
    • Registering Custom Widgets
  • Widget
    • Widget class
    • How to create a custom widget
    • Widget Renderer
    • WidgetData
    • DynamicValueRegistry
    • Scaling
  • Screens
    • AbstractMoveableScreen
  • ContextMenu
    • ContextMenu class
    • Using context menu
    • Option<T> class
      • Color Option
      • Boolean Option
      • Double Option
      • Runnable Option
      • Enum Option
      • List Option
      • SubMenu Option
Powered by GitBook
On this page
  • Introduction
  • Constructor

Was this helpful?

  1. ContextMenu
  2. Option<T> class

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));
PreviousOption<T> classNextBoolean Option

Last updated 7 months ago

Was this helpful?