OSRS Plugin API
    Preparing search index...

    Interface ValueListener

    interface ValueListener {
        onValueChange?: any;
    }

    Implemented by

    Index

    Properties

    Properties

    onValueChange?: any

    The function callback invoked when the element's value is changed.

    -- Create new container
    local newWindow = osrs.Ui.window({title = "Example Window"})

    -- Create a new dropdown menu with a change function
    local menu = osrs.Ui.dropdown(
    {
    label = "Test",
    values = {"Test1", "Test2", "Test3"},
    onValueChange = function()
    osrs.print("Change")
    end
    }
    )

    -- Add dropdown to the container
    newWindow:addChild(menu)

    -- Add container to the canvas
    osrs.Ui.canvas:addChild(newWindow)