PokéRogue
    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

    Properties

    COLUMNS: number
    cursor: number
    handler: UiHandler
    ROWS: number
    scrollBar?: ScrollBar
    scrollCursor: number
    totalElements: number
    updateDetailsCallback?: UpdateDetailsCallbackFunction

    Optional function that will get called if a single element's information needs to get updated

    updateGridCallback?: UpdateGridCallbackFunction

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

    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