TextBox

Updated for version 3.37.

It's recommended to first read about the base item before reading about other items https://luffyyy.gitbook.io/beardlib/menuui/menuui-item

TextBox / NumberBox

Creation

MyRandomMenu:TextBox({
    name = "MyTextBox",
    text = "Text box",
    value = "Textbox value",
    on_callback = function(item)
        log("Value changed!", tostring(item:Value()))
    end
})

Or if a NumberBox:

MyRandomMenu:NumberBox({
    name = "MyNumberBox",
    text = "Number box",
    value = "0",
    on_callback = function(item)
        log("Value changed!", tostring(item:Value()))
    end
})

Why would you use NumberBox instead of Slider?

  • You don't have to set a minimum and a maximum.

  • Sliding is not based on mouse position but is based on step.

  • You prefer the style of the numberbox.

Parameters

Functions

Get

Set

ColorTextBox

Pretty much TextBox but modified for colors

Creation

MyRandomMenu:ColorTextBox({
    name = "ColorItem",
    text = "My cool color",
    value = Color(1,1,1),
    on_callback = function(item)
        log("New color!", tostring(item:Value()))
    end
})

Parameters

Functions

Get

Set

Last updated