pokemon-rogue-battle
    Preparing search index...

    A helper class to handle navigation through a grid of elements that can scroll vertically Needs to be used by a UiHandler How to use:

    • in UiHandler.setup: Initialize with the UiHandler that handles the grid, the number of rows and columns that can be shown at once, an optional ScrollBar, and optional callbacks that will get called after scrolling
    • in UiHandler.show: Set setTotalElements to the total number of elements in the list to display
    • in UiHandler.processInput: call processNavigationInput to have it handle the cursor updates while calling the defined callbacks
    • in UiHandler.clear: call reset
    Index

    Constructors

    Methods

    • Update the cursor and scrollCursor based on user input

      Parameters

      • button: Button

        the button that was pressed

      Returns boolean

      true if either the cursor or scrollCursor was updated

    • Parameters

      • totalElements: number

        the total number of elements that the grid needs to display

      Returns void

    • Set function that will get called if the whole grid needs to get updated

      Parameters

      • callback: UpdateGridCallbackFunction

        UpdateGridCallbackFunction

      Returns default

      this

    • Set function that will get called if a single element in the grid needs to get updated

      Parameters

      • callback: UpdateDetailsCallbackFunction

        UpdateDetailsCallbackFunction

      Returns default

      this