🚀
Maclib UI Library
  • Information
    • Welcome
    • Documentation Formatting
    • Miscellaneous
  • Getting Started
    • Loading Maclib
      • Creating a window
        • Adding a Global Setting
        • Displaying a notification
        • Prompting a dialog
        • Creating a tab group
          • Adding tabs
            • Adding sections
              • Button
              • Input
              • Slider
              • Toggle
              • Keybind
              • Colorpicker
              • Dropdown
              • Header
              • Paragraph
              • Label
              • Sub Label
              • Divider
              • Spacer
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Loading Maclib
  3. Creating a window
  4. Creating a tab group
  5. Adding tabs
  6. Adding sections

Slider

PreviousInputNextToggle

Last updated 7 months ago

Was this helpful?

Section:Slider({
  Name <string>
  Default <number>
  Minimum <number>
  Maximum <number>
  DisplayMethod <string: "Round", "Degrees", "Percent", "Value">
  Precision <number>
  Callback <function(): number>
  onInputComplete <function(): number>
}, <string or nil> Flag)

Functions

:UpdateName(<string>)
:SetVisiblity(<boolean>)
:UpdateValue(<number>)
:GetValue(: number)

.Value : number
.IgnoreConfig <boolean>
.Settings : table -- Not everything may be updated, but Callback should be correct.

Example

sections.MainSection1:Slider({
	Name = "Walkspeed",
	Default = 16,
	Minimum = 0,
	Maximum = 100,
	DisplayMethod = "Percent",
	Callback = function(Value)
		print("Changed to ".. Value)
	end,
}, "WalkspeedSlider")