PokéRogue
    Preparing search index...

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

    Hierarchy (View Summary)

    Index
    achvsName: string
    achvsTotal: number = ...
    active: boolean = false
    awaitingActionInput: boolean
    COLS: 18
    currentPage: Page
    currentTotal: number
    cursor: number = 0
    cursorObj: NineSlice | null
    headerActionButton: Sprite
    headerActionText: Text
    headerBg: NineSlice
    headerBgX: number
    headerText: Text
    icons: Sprite[]
    iconsBg: NineSlice
    iconsContainer: Container
    mainContainer: Container
    message: Text
    nameBoxContainer?: Container

    The container for the name box

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

    onActionInput: AnyFn<any> | null
    pendingPrompt: boolean = false
    prompt: Sprite
    ROWS: 4
    scoreContainer: Container
    scoreText: Text
    scrollBar: ScrollBar
    scrollCursor: number = 0
    textCallbackTimer: TimerEvent | null
    textTimer: TimerEvent | null
    titleBg: NineSlice
    titleText: Text
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    unlockText: Text
    vouchersName: string
    vouchersTotal: number = ...
    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.

    • setScrollCursor(scrollCursor: number) : boolean scrollCursor refers to the page's position within the entire sum of the data, unlike cursor, which refers to a user's position within displayed data

      Parameters

      • scrollCursor: number

        takes a value that has been updated based on user behavior

      Returns boolean

      returns a boolean that indicates whether the updated scrollCursor led to an update in the data displayed.

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

      Returns void

    • Updates the icons displayed on the UI based on the current page and scroll cursor.

      Type Parameters

      • T extends boolean

      Parameters

      • items: T extends true ? Achv[] : Voucher[]

        The items to display (achievements or vouchers).

      • unlocks: T extends true ? AchvUnlocks : VoucherUnlocks

        The unlocks data for the items.

      • headerText: string

        The text for the header.

      • actionText: string

        The text for the action button.

      • totalItems: number

        The total number of items.

      • forAchievements: T

        True when updating icons for the achievements page, false for the vouchers page.

      Returns void