OneConfig V1
  • Welcome
  • Documentation license
  • Introduction
    • Getting started
  • Configuration
    • Creating your config
      • Option dependencies & hiding options
      • Listening for option changes
    • Available options
      • Boolean options
        • Switch option
        • Checkbox option
      • Number options
        • Slider option
        • Number option
      • Selector options
        • Dropdown option
        • Radio button option
      • Text option
      • Color option
      • Keybind option
      • Buttons
      • Accordions
      • Decorations
    • Creating your own options
  • Commands
    • Annotation-based commands
    • Tree-based commands
  • Events
    • Using the events system
      • Callback events
      • Subscriber events
  • Utilities Module
    • Hypixel utilities
    • IO utilities
    • Networking utilities
    • JSON utilities
    • Multithreading
    • Platform-specific utilities
  • Migration
    • Temporary V0 -> V1 migration guide
    • Migrating your configs from Vigilance
Powered by GitBook
On this page
Export as PDF
  1. Configuration
  2. Available options
  3. Number options

Slider option

Example

@Slider(
    title = "My Slider",
    description = "This is my slider", // Recommended, default = ""
    icon = "/my_slider.svg", // Optional, default = ""
    category = "Sliders", // Recommended, default = "General"
    subcategory = "General", // Recommended, default = "General"
    min = 0f, // Recommended, default = 0f
    max = 100f, // Recommended, default = 100f
    step = 1f // Optional, default = 10f
)
public static float mySlider = 0f;
var mySlider: Float by slider(
    name = "My Slider",
    def = 0f, // Sets option's default value. Recommended, default = 0f
    description = "This is my switch", // Recommended, default = ""
    icon = "/my_switch.svg", // Optional, default = ""
    category = "Switches", // Recommended, default = "General"
    subcategory = "General", // Recommended, default = "General"
    min = 0f, // Recommended, default = 0f
    max = 100f, // Recommended, default = 100f
    step = 1f, // Optional, default = 10f
)

Your field can be typed with any subtype of Number.

PreviousNumber optionsNextNumber option

Last updated 5 months ago