cheatgui
    Preparing search index...

    Class DropdownWidget

    A class that represents a menu for selecting one of several values.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Create a new dropdown.

      The values parameter should be an object where the keys are the display text and the values are the actual values.

      Parameters

      • Optionallabel: string = ''

        The label text.

      • Optionalvalues: object = {}

        The values to display in the dropdown.

      • Optionalvalue: string | null = null

        The initial value of the dropdown.

      • Optionalcallback: ((value: string) => void) | null = null

        The callback function to call when the value is changed.

      Returns DropdownWidget

    Properties

    id: string
    labelRef: HTMLSpanElement
    listeners: { [key: string]: EventCallback[] }
    ref: HTMLLabelElement
    selRef: HTMLSelectElement
    view: View

    Methods

    • Bind a property to the dropdown.

      Parameters

      • obj: any

        The object to bind the property to.

      • prop: string

        The property to bind.

      Returns this

    • Set the callback function to call when the value is changed.

      Parameters

      • func: (value: string) => void

        The callback function to call when the value is changed.

      Returns this