cheatgui
    Preparing search index...

    Class ButtonWidget

    A class that represents a button widget.

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new button widget and initialize it.

      Parameters

      • Optionaltext: string = ''

        Button text.

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

        The function to call when the button is clicked.

      Returns ButtonWidget

    Properties

    listeners: { [key: string]: EventCallback[] }
    ref: HTMLElement
    view: View

    Methods

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • Add a click event listener to the widget.

      Parameters

      • f: () => void

        The function to call when the widget is clicked.

      Returns this

    • Set the content of the widget.

      Parameters

      • value: string

        The value to set the content to.

      Returns this

    • Set the text of the widget.

      Parameters

      • value: string

        The value to set the text to.

      Returns this