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: Image
    defaultText: string = ...
    eggDropTweenChain?: TweenChain

    The tween chain playing the egg drop animation sequence

    eggGachaContainer: Container
    eggGachaMessageBox: NineSlice
    eggGachaOptionsContainer: Container
    eggGachaOptionSelectBg: NineSlice
    eggGachaOverlay: Rectangle
    eggGachaSummaryContainer: Container
    gachaContainers: Container[] = []
    gachaCursor: number
    gachaHatches: Sprite[] = []
    gachaInfoContainers: Container[] = []
    gachaKnobs: Sprite[] = []
    legendaryExpiration: Text = ...
    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
    playTimeTimer: TimerEvent | null
    prompt: Sprite
    scale: number = 0.1666666667
    summaryFinished: boolean
    textCallbackTimer: TimerEvent | null
    textTimer: TimerEvent | null
    transitionCancelled: boolean
    transitioning: boolean
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    voucherCountLabels: Text[] = []
    wordWrapWidth: number = 1780
    • Get the guaranteed egg tier based on the pull count

      Parameters

      • pullCount: number

        The number of pulls made

      Returns EggTier

      The guaranteed egg tier for the given pull count

    • Process an action input received during voucher selection.

      Parameters

      • cursor: number

        The index of the voucher menu option

      Returns boolean | undefined

      True if the success sound should be played, false if the error sound should be played, or undefined if the cursor is out of range.

      Handles playing the error sound and showing the error message, but does not handle playing the success sound.

    • 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.

    • Process an input received in the normal mode of the egg gacha UI (not transitoning, not summary)

      Parameters

      • button: Button

        The button that was pressed

      Returns boolean | undefined

      true if the success sound should be played, false if the error sound should be played, or undefined no input event occurred.

    • Handles an input event that occurs while the egg gacha summary is visible

      Parameters

      • button: Button

        The button that was pressed

      Returns true | undefined

      true if an input event occurred and the select sound should be played, otherwise undefined

    • Process an input received while the egg gacha UI is transitioning

      Parameters

      • button: Button

        The button that was pressed

      Returns true | undefined

      • true if the success sound should be played, otherwise undefined
    • 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

    • Convert a cursor index to a voucher type and count

      Parameters

      • cursor: number

        The cursor index corresponding to the voucher type

      Returns [VoucherType, number, number] | undefined

      The voucher type, vouchers used, and pulls given, or an empty array if the cursor is not on a voucher