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
    awaitingActionInput: boolean
    cursor: number = 0
    cursorObj: Container | null
    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
    saveSlotSelectCallback: SaveSlotSelectCallback | null
    saveSlotSelectContainer: Container
    saveSlotSelectMessageBox: NineSlice
    saveSlotSelectMessageBoxContainer: Container
    scrollCursor: number = 0
    sessionSlots: SessionSlot[]
    sessionSlotsContainer: Container
    sessionSlotsContainerInitialY: number
    textCallbackTimer: TimerEvent | null
    textTimer: TimerEvent | null
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    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.

    • Helper function that checks if the session slot involved holds data or not

      Parameters

      • hasData: boolean

        true if session slot contains data | 'false' if not

      Returns void

    • Move the cursor to a new position and update the view accordingly

      Parameters

      • cursor: number

        the new cursor position, between 0 and SLOTS_ON_SCREEN - 1

      • OptionalprevSlotIndex: number

        index of the previous session occupied by the cursor, between 0 and SESSION_SLOTS_COUNT - 1 - optional

      Returns boolean

      true if the cursor position has changed | false if it has not

    • Move the scrolling cursor to a new position and update the view accordingly

      Parameters

      • scrollCursor: number

        the new cursor position, between 0 and SESSION_SLOTS_COUNT - SLOTS_ON_SCREEN

      • OptionalprevSlotIndex: number

        index of the previous slot occupied by the cursor, between 0 and SESSION_SLOTS_COUNT-1 - optional

      Returns boolean

      true if the cursor position has changed | false if it has not

    • 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

      Returns void