LogoLogo
  • Introduction
  • Documentation License
  • Modding Basics
  • Getting Started
  • Configuration
    • Creating a Config
    • Config Options
      • Boolean Configs
      • Number Configs
      • Selector Configs
      • Text Configs
      • Buttons, Colors and Keybinds
      • Decorative Components
      • Custom options
    • Migration
  • Events
    • Event Basics
    • Available Events
      • ChatReceiveEvent
      • TickEvent
      • InitializationEvent
      • HudRenderEvent
      • Packet Events
      • LocrawEvent
  • Graphics & UI
    • Render Manager
      • Font Rendering
    • Elements
    • Pages
  • Commands
    • Commands
    • An Example Command
  • HUDs
    • HUD Basics
  • Utilities
    • OneConfig's Utilities
      • Notifications
      • HypixelUtils
    • OneColor
    • OneUIScreen
Powered by GitBook
On this page

Was this helpful?

  1. Configuration
  2. Config Options

Selector Configs

Learn about components that allow the user to select between multiple options.

PreviousNumber ConfigsNextText Configs

Last updated 2 years ago

Was this helpful?

Dropdown List

A dropdown list lets the user select options from a list. If switches are booleans, and sliders are integers, a dropdown is an enum. It's got both single and dual-column variants.

It uses a String Array to list the options and returns its position index within that array. In the example below, the default value is set to 1, which corresponds to the second option.

@Dropdown(
    name = "I drop!",        // name of the component
    options = {"An option", "Another option", "Maybe this one?", "Or this!"},
)
public static int value = 1;        // default option (here "Another Option")
Dropdown example, open and closed with list