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
    nameBoxContainer?: Container

    The container for the name box

    This will be undefined unless this.initNameBox() was called

    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
    wordWrapWidth: number = 1780
    • Add the name box shown by showDialogue to the given message container.

      Parameters

      • container: Container

        The container holding the message text

      • x: number = 0

        The x position of the name box

      • y: number = -16

        The y position of the name box

      Returns void

      If this method is not called, the name box will not be displayed.

    • 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

    • Changes the current starter.

      This:

      • updates all cursors
      • stops the animation of the previous starter
      • starts the animation of the new starter
      • calls other methods which set details for the starter.

      If setting no starter, call setNoStarter instead.

      Parameters

      • starterId: StarterSpeciesId

        the id of the new starter

      • iconAnimation: boolean = true

      Returns void

    • 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
      • Optionalname: string
      • Optionaldelay: number | null
      • Optionalcallback: (() => void) | null
      • OptionalcallbackDelay: number | null
      • Optionalprompt: boolean | null
      • OptionalpromptDelay: number | null

      Returns void

    • Show a name above the text.

      Parameters

      • name: string

        The name to show

      • OptionaliconFrame: string

        The frame of the icon to display next to the name

      Returns void

      the icon must be from the items atlas

    • 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