PokéRogue
    Preparing search index...

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    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
    mode: null | number
    onActionInput: null | Function
    pendingPrompt: boolean
    playTimeTimer: null | TimerEvent
    prompt: Sprite
    scale: number = 0.1666666667
    summaryFinished: boolean
    textCallbackTimer: null | TimerEvent
    textTimer: null | TimerEvent
    transitionCancelled: boolean
    transitioning: boolean
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    voucherCountLabels: Text[]

    Methods

    • Process an action input received during voucher selection.

      Parameters

      • cursor: number

        The index of the voucher menu option

      Returns undefined | boolean

      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.

    • 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 undefined | boolean

      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 undefined | true

      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 undefined | true

      • true if the success sound should be played, otherwise undefined
    • Parameters

      • text: string
      • Optional_name: string
      • Optionaldelay: null | number
      • Optionalcallback: null | Function
      • OptionalcallbackDelay: null | number
      • Optionalprompt: null | boolean
      • OptionalpromptDelay: null | number

      Returns void

    • Parameters

      • text: string
      • Optionaldelay: number
      • Optionalcallback: Function
      • 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 undefined | [VoucherType, number, number]

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