PokéRogue
    Preparing search index...

    A basic abstract class to act as a holder and processor for UI elements.

    Hierarchy (View Summary)

    Index
    active: boolean = false
    allowTera: boolean
    awaitingActionInput: boolean
    blockInput: boolean = false
    canCycle: CanCycle = ...
    cursor: number = 0
    cursorObj: Image
    filterBar: FilterBar
    filterBarCursor: number = 0
    filteredStarterIds: StarterSpeciesId[] = []
    filterMode: boolean
    hasSwappedMoves: boolean = false

    Used to check whether any moves were swapped using the reorder menu, to decide whether a save should be performed or not.

    iconAnimHandler: PokemonIconAnimHelper
    instructionsContainer: StarterSelectInstructionsContainer
    lastStarterId: StarterSpeciesId
    message: Text
    moveInfoOverlay: MoveInfoOverlay
    oldCursor: number = -1
    onActionInput: AnyFn<any> | null
    originalStarterPreferences: AllStarterPreferences
    partyColumn: Container
    partyCursorObj: Image
    partyIcons: Sprite[]
    partyIconsCursorIndex: number
    partyStarterIds: StarterSpeciesId[] = []
    partyStarters: Starter[] = []
    pendingPrompt: boolean = false
    pokerusCursorObjs: Image[]
    pokerusSpeciesIds: StarterSpeciesId[] = []
    prompt: Sprite
    randomCursorObj: NineSlice
    scrollCursor: number
    showIvsMode: boolean
    startCursorObj: NineSlice
    starterContainers: StarterContainer[] = []
    starterCursorObjs: Image[]
    starterMoveset: StarterMoveset | null
    starterPreferences: AllStarterPreferences
    starterSelectCallback: StarterSelectCallback | null
    starterSelectContainer: Container
    starterSelectMessageBox: NineSlice
    starterSelectMessageBoxContainer: Container
    starterSelectScrollBar: ScrollBar
    starterSummary: StarterSummary
    textCallbackTimer: TimerEvent | null
    textTimer: TimerEvent | null
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    valueLimitLabel: Text
    • Checks whether a given starter is already in the party.

      Parameters

      Returns [isDupe: boolean, removeIndex: number]

      A tuple with a boolean indicating whether the starter is a duplicate and the index of the starter if it is a duplicate

    • Updates all information for the current starter. This should be called every time that preferences are updated.

      Among other things, it updates the moveset and party information to match the current preferences.

      Parameters

      • starterId: StarterSpeciesId

        the id of the new starter

      • save: boolean = true

        whether the new details should be saved to local storage.

      Returns void

    • Parameters

      • text: string
      • Optional_name: string
      • Optionaldelay: number | null
      • Optionalcallback: (() => void) | null
      • OptionalcallbackDelay: number | null
      • Optionalprompt: boolean | null
      • OptionalpromptDelay: number | null

      Returns void

    • Parameters

      • text: string
      • Optionaldelay: number
      • Optionalcallback: () => void
      • OptionalcallbackDelay: number
      • Optionalprompt: boolean
      • OptionalpromptDelay: number
      • OptionalmoveToTop: boolean

      Returns void

    • Starts the icon animation of the container at the given cursor.

      Parameters

      • cursor: number

        the index of the container, ranging from 1 to 81.

      Returns void

    • Stops the icon animation of the container at the given cursor.

      Parameters

      • cursor: number

        the index of the container, ranging from 1 to 81.

      Returns void

    • Puts a move at the requested index in the current highlighted Pokemon's moveset.
      If the move was already present in the moveset, swap its position with the one at the requested index.

      Parameters

      • targetIndex: number

        The index to place the move

      • newMove: MoveId

        The move to place in the moveset

      • previousMove: MoveId

        The move that was previously in the spot

      Returns void

      ⚠️ this.starterMoveset must not be null when this method is called