Skip to main content

TDebugPanel

The debug panel holds a number of stats to display on the UI. The panel also acts as the default section.

Hierarchy

  • default
    • TDebugPanel

Index

Constructors

constructor

  • Parameters

    Returns default

Properties

publicdead

dead: boolean = false

publicname

name: string

publicrows

rows: IDebugPanelRow[] = []

publicstartOpen

startOpen: boolean

publicuuid

uuid: string

Methods

publicaddButtons

  • addButtons(label: string, ...buttons: TButton[]): default
  • Add new row to the section with buttons


    Parameters

    • label: string

      Text label for row

    • rest...buttons: TButton[]

      Array of buttons for the row

    Returns default

publicaddCheckbox

  • addCheckbox(label: string, startingValue: boolean, onChange: (value: boolean) => void): default
  • Add new row to the section with a checkbox


    Parameters

    • label: string
    • startingValue: boolean
    • onChange: (value: boolean) => void

      Returns default

    publicaddColorPicker

    • addColorPicker(label: string, startingValue: vec3, onChange: (value: vec3) => void): default
    • Parameters

      • label: string
      • startingValue: vec3
      • onChange: (value: vec3) => void

        Returns default

      publicaddFredValue

      • addFredValue(label: string, valueKey: string): default
      • Add new row to the section with string value from Fred stats


        Parameters

        • label: string

          Text label for row

        • valueKey: string

        Returns default

      publicaddInput

      • addInput(label: string, inputType: TDebugInputTypes, startingValue: string, onChange: (value: string) => void, inputProps?: TDebugInputProps): default
      • Add new row to the section with an input


        Parameters

        • label: string
        • inputType: TDebugInputTypes
        • startingValue: string
        • onChange: (value: string) => void
          • optionalinputProps: TDebugInputProps

          Returns default

        publicaddSection

        • addSection(name: string, startOpen?: boolean): default
        • Add new section to the debug panel


          Parameters

          • name: string

            Name of section

          • startOpen: boolean = false

          Returns default

        publicaddSelect

        • addSelect(label: string, options: TDebugSelectOption[], startingValue: string, onChange: (value: string) => void): default
        • Add new row to the section with a select box


          Parameters

          • label: string
          • options: TDebugSelectOption[]
          • startingValue: string
          • onChange: (value: string) => void

            Returns default

          publicaddValue

          • addValue(label: string, updateFunction: TUpdateFunction, indentLevel?: number): default
          • Add new row to the section with string value


            Parameters

            • label: string

              Text label for row

            • updateFunction: TUpdateFunction

              Function to return value every update

            • indentLevel: number = 0

            Returns default

          publicgetData

          • getData(): TDebugPanelSectionSerializedData
          • Returns TDebugPanelSectionSerializedData

          publicremove

          • remove(): void
          • Remove section from the debug panel


            Returns void

          publictoggle

          • toggle(): void
          • Toggle visibily of the debug panel


            Returns void

          publicupdate

          • update(engine: default, delta: number): void
          • Runs every update to keep rows up to date


            Parameters

            Returns void