# default | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class default

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

#### Hierarchy (View Summary)

- default
  - default

- Defined in src/ui/pokedex-ui-handler.ts:155

##### Index

### Constructors

constructor

### Properties

active
awaitingActionInput
blockInput
cursor
cursorObj
manageDataConfig
message
mode
onActionInput
optionSelectText
pendingPrompt
prompt
scale
textCallbackTimer
textTimer
tutorialActive
tutorialOverlay

### Methods

checkIconId
clear
clearText
closeFormTray
destroy
getCurrentDexProps
getCursor
getFriendship
getSanitizedProps
getStarterSpeciesId
getTextColor
getUi
hasFormLevelMove
initPromptSprite
initStarterPrefs
initTutorialOverlay
isPassiveAvailable
isSameSpeciesEggAvailable
isSeen
isTextAnimationInProgress
isUpgradeAnimationEnabled
isUpgradeIconEnabled
isValueReductionAvailable
openFormTray
processInput
processTutorialInput
resetFilters
setCursor
setFilterMode
setFilterTextMode
setMouseCursorStyle
setSpecies
setSpeciesDetails
setTrayCursor
setTypeIcons
setup
setUpgradeAnimation
setUpgradeIcon
show
showDialogue
showPrompt
showText
startIconAnimation
stopIconAnimation
tryExit
updateButtonIcon
updateCandyUpgradeDisplay
updateFilterButtonIcon
updateScroll
updateStarters
updateStarterValueLabel

## Constructors

### constructor

- new default(): default

  #### Returns default

  Overrides default.constructor

  - Defined in src/ui/pokedex-ui-handler.ts:233

## Properties

### active

active: boolean = false

Inherited from default.active

- Defined in src/ui/ui-handler.ts:13

### `Protected` awaitingActionInput

awaitingActionInput: boolean

Inherited from default.awaitingActionInput

- Defined in src/ui/awaitable-ui-handler.ts:7

### `Protected` blockInput

blockInput: boolean = false

- Defined in src/ui/pokedex-ui-handler.ts:191

### `Protected` cursor

cursor: number = 0

Inherited from default.cursor

- Defined in src/ui/ui-handler.ts:12

### cursorObj

cursorObj: Image

- Defined in src/ui/pokedex-ui-handler.ts:184

### `Protected` manageDataConfig

manageDataConfig: OptionSelectConfig

- Defined in src/ui/pokedex-ui-handler.ts:200

### message

message: Text

Inherited from default.message

- Defined in src/ui/message-ui-handler.ts:11

### `Protected` mode

mode: null | number

Inherited from default.mode

- Defined in src/ui/ui-handler.ts:11

### `Protected` onActionInput

onActionInput: null | Function

Inherited from default.onActionInput

- Defined in src/ui/awaitable-ui-handler.ts:8

### `Protected` optionSelectText

optionSelectText: Text

- Defined in src/ui/pokedex-ui-handler.ts:202

### pendingPrompt

pendingPrompt: boolean

Inherited from default.pendingPrompt

- Defined in src/ui/message-ui-handler.ts:9

### prompt

prompt: Sprite

Inherited from default.prompt

- Defined in src/ui/message-ui-handler.ts:12

### `Protected` scale

scale: number = 0.1666666667

- Defined in src/ui/pokedex-ui-handler.ts:203

### `Protected` textCallbackTimer

textCallbackTimer: null | TimerEvent

Inherited from default.textCallbackTimer

- Defined in src/ui/message-ui-handler.ts:8

### `Protected` textTimer

textTimer: null | TimerEvent

Inherited from default.textTimer

- Defined in src/ui/message-ui-handler.ts:7

### tutorialActive

tutorialActive: boolean = false

Inherited from default.tutorialActive

- Defined in src/ui/awaitable-ui-handler.ts:9

### tutorialOverlay

tutorialOverlay: Rectangle

Inherited from default.tutorialOverlay

- Defined in src/ui/awaitable-ui-handler.ts:10

## Methods

### checkIconId

- checkIconId(
  icon: Sprite,
  species: default ,
  female: boolean,
  formIndex: number,
  shiny: boolean,
  variant: number,
  ): void

  #### Parameters

  - icon: Sprite
  - species: default
  - female: boolean
  - formIndex: number
  - shiny: boolean
  - variant: number

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2379

### clear

- clear(): void

  #### Returns void

  Overrides default.clear

  - Defined in src/ui/pokedex-ui-handler.ts:2368

### clearText

- clearText(): void

  #### Returns void

  Overrides default.clearText

  - Defined in src/ui/pokedex-ui-handler.ts:2363

### closeFormTray

- closeFormTray(): boolean

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1980

### destroy

- destroy(): void

  To be implemented by individual handlers when necessary to free memory Called when BattleScene is reset

  #### Returns void

  Overrides default.destroy

  - Defined in src/ui/pokedex-ui-handler.ts:2358

### getCurrentDexProps

- getCurrentDexProps(speciesId: number): bigint

  Creates a temporary dex attr props that will be used to display the correct shiny, variant, and form based on the StarterPreferences

  #### Parameters

  - speciesId: number

    the id of the species to get props for

  #### Returns bigint

  the dex props

  - Defined in src/ui/pokedex-ui-handler.ts:2301

### getCursor

- getCursor(): number

  #### Returns number

  Inherited from default.getCursor

  - Defined in src/ui/ui-handler.ts:40

### getFriendship

- getFriendship(
  speciesId: number,
  ): { currentFriendship: number; friendshipCap: number }

  #### Parameters

  - speciesId: number

  #### Returns { currentFriendship: number; friendshipCap: number }

  - Defined in src/ui/pokedex-ui-handler.ts:2014

### getSanitizedProps

- getSanitizedProps(props: DexAttrProps ): DexAttrProps

  #### Parameters

  - props: DexAttrProps

  #### Returns DexAttrProps

  - Defined in src/ui/pokedex-ui-handler.ts:1312

### getStarterSpeciesId

- getStarterSpeciesId(speciesId: any): number

  #### Parameters

  - speciesId: any

  #### Returns number

  - Defined in src/ui/pokedex-ui-handler.ts:808

### getTextColor

- getTextColor(style: TextStyle , shadow?: boolean): string

  #### Parameters

  - style: TextStyle
  - shadow: boolean = false

  #### Returns string

  Inherited from default.getTextColor

  - Defined in src/ui/ui-handler.ts:36

### getUi

- getUi(): default

  #### Returns default

  Inherited from default.getUi

  - Defined in src/ui/ui-handler.ts:32

### hasFormLevelMove

- hasFormLevelMove(form: PokemonForm , selectedMove: string): boolean

  #### Parameters

  - form: PokemonForm
  - selectedMove: string

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1323

### initPromptSprite

- initPromptSprite(container: Container): void

  Add the sprite to be displayed at the end of messages with prompts

  #### Parameters

  - container: Container

    the container to add the sprite to

  #### Returns void

  Inherited from default.initPromptSprite

  - Defined in src/ui/message-ui-handler.ts:24

### initStarterPrefs

- initStarterPrefs(species: default ): StarterAttributes

  Get the starter attributes for the given PokemonSpecies, after sanitizing them. If somehow a preference is set for a form, variant, gender, ability or nature that wasn't actually unlocked or is invalid it will be cleared here

  #### Parameters

  - species: default

    The species to get Starter Preferences for

  #### Returns StarterAttributes

  StarterAttributes for the species

  - Defined in src/ui/pokedex-ui-handler.ts:661

### initTutorialOverlay

- initTutorialOverlay(container: Container): void

  Create a semi transparent overlay that will get shown during tutorials

  #### Parameters

  - container: Container

    the container to add the overlay to

  #### Returns void

  Inherited from default.initTutorialOverlay

  - Defined in src/ui/awaitable-ui-handler.ts:33

### isPassiveAvailable

- isPassiveAvailable(speciesId: number): boolean

  Determines if a passive upgrade is available for the given species ID

  #### Parameters

  - speciesId: number

    The ID of the species to check the passive of

  #### Returns boolean

  true if the user has enough candies and a passive has not been unlocked already

  - Defined in src/ui/pokedex-ui-handler.ts:820

### isSameSpeciesEggAvailable

- isSameSpeciesEggAvailable(speciesId: number): boolean

  Determines if an same species egg can be bought for the given species ID

  #### Parameters

  - speciesId: number

    The ID of the species to check the value reduction of

  #### Returns boolean

  true if the user has enough candies

  - Defined in src/ui/pokedex-ui-handler.ts:852

### isSeen

- isSeen(species: default , dexEntry: DexEntry ): boolean

  #### Parameters

  - species: default
  - dexEntry: DexEntry

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:784

### isTextAnimationInProgress

- isTextAnimationInProgress(): boolean

  #### Returns boolean

  Inherited from default.isTextAnimationInProgress

  - Defined in src/ui/message-ui-handler.ts:259

### isUpgradeAnimationEnabled

- isUpgradeAnimationEnabled(): boolean

  Determines if 'Animation' based upgrade notifications should be shown

  #### Returns boolean

  true if upgrade notifications are enabled and set to display an 'Animation'

  - Defined in src/ui/pokedex-ui-handler.ts:804

### isUpgradeIconEnabled

- isUpgradeIconEnabled(): boolean

  Determines if 'Icon' based upgrade notifications should be shown

  #### Returns boolean

  true if upgrade notifications are enabled and set to display an 'Icon'

  - Defined in src/ui/pokedex-ui-handler.ts:797

### isValueReductionAvailable

- isValueReductionAvailable(speciesId: number): boolean

  Determines if a value reduction upgrade is available for the given species ID

  #### Parameters

  - speciesId: number

    The ID of the species to check the value reduction of

  #### Returns boolean

  true if the user has enough candies and all value reductions have not been unlocked already

  - Defined in src/ui/pokedex-ui-handler.ts:835

### openFormTray

- openFormTray(species: default ): boolean

  #### Parameters

  - species: default

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1917

### processInput

- processInput(button: Button ): boolean

  #### Parameters

  - button: Button

  #### Returns boolean

  Overrides default.processInput

  - Defined in src/ui/pokedex-ui-handler.ts:965

### processTutorialInput

- processTutorialInput(button: Button ): boolean

  #### Parameters

  - button: Button

  #### Returns boolean

  Inherited from default.processTutorialInput

  - Defined in src/ui/awaitable-ui-handler.ts:16

### resetFilters

- resetFilters(): void

  Set the selections for all filters to their default starting value

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:751

### setCursor

- setCursor(cursor: number): boolean

  #### Parameters

  - cursor: number

  #### Returns boolean

  Overrides default.setCursor

  - Defined in src/ui/pokedex-ui-handler.ts:1851

### setFilterMode

- setFilterMode(filterMode: boolean): boolean

  #### Parameters

  - filterMode: boolean

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1881

### setFilterTextMode

- setFilterTextMode(filterTextMode: boolean): boolean

  #### Parameters

  - filterTextMode: boolean

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1899

### `Protected` setMouseCursorStyle

- setMouseCursorStyle(cursorStyle: "default" | "pointer"): void

  Changes the style of the mouse cursor.

  #### Parameters

  - cursorStyle: "default" | "pointer"

    cursor style to apply

  #### Returns void

  #### See

  https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

  Inherited from default.setMouseCursorStyle

  - Defined in src/ui/ui-handler.ts:58

### setSpecies

- setSpecies(species: null | default ): void

  #### Parameters

  - species: null | default

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2051

### setSpeciesDetails

- setSpeciesDetails(species: default , options?: SpeciesDetails): void

  #### Parameters

  - species: default
  - options: SpeciesDetails = {}

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2108

### setTrayCursor

- setTrayCursor(cursor: number): boolean

  #### Parameters

  - cursor: number

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:1993

### setTypeIcons

- setTypeIcons(type1: null | PokemonType , type2: null | PokemonType ): void

  #### Parameters

  - type1: null | PokemonType
  - type2: null | PokemonType

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2222

### setup

- setup(): void

  #### Returns void

  Overrides default.setup

  - Defined in src/ui/pokedex-ui-handler.ts:237

### setUpgradeAnimation

- setUpgradeAnimation(icon: Sprite, species: default , startPaused?: boolean): void

  Sets a bounce animation if enabled and the Pokemon has an upgrade

  #### Parameters

  - icon: Sprite

    Phaser.GameObjects.GameObject to animate

  - species: default

    `PokemonSpecies` of the icon used to check for upgrades

  - startPaused: boolean = false

    Should this animation be paused after it is added?

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:867

### setUpgradeIcon

- setUpgradeIcon(starter: PokedexMonContainer ): void

  Sets the visibility of a Candy Upgrade Icon

  #### Parameters

  - starter: PokedexMonContainer

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:920

### show

- show(args: any[]): boolean

  #### Parameters

  - args: any[]

  #### Returns boolean

  Overrides default.show

  - Defined in src/ui/pokedex-ui-handler.ts:612

### showDialogue

- showDialogue(
  text: string,
  _name?: string,
  delay?: null | number,
  callback?: null | Function,
  callbackDelay?: null | number,
  prompt?: null | boolean,
  promptDelay?: null | number,
  ): void

  #### Parameters

  - text: string
  - `Optional`_name: string
  - `Optional` delay: null | number
  - `Optional` callback: null | Function
  - `Optional` callbackDelay: null | number
  - `Optional` prompt: null | boolean
  - `Optional` promptDelay: null | number

  #### Returns void

  Inherited from default.showDialogue

  - Defined in src/ui/message-ui-handler.ts:48

### showPrompt

- showPrompt(callback?: null | Function, callbackDelay?: null | number): void

  #### Parameters

  - `Optional` callback: null | Function
  - `Optional` callbackDelay: null | number

  #### Returns void

  Inherited from default.showPrompt

  - Defined in src/ui/message-ui-handler.ts:222

### showText

- showText(
  text: string,
  delay?: number,
  callback?: Function,
  callbackDelay?: number,
  prompt?: boolean,
  promptDelay?: number,
  moveToTop?: boolean,
  ): void

  #### Parameters

  - text: string
  - `Optional` delay: number
  - `Optional` callback: Function
  - `Optional` callbackDelay: number
  - `Optional` prompt: boolean
  - `Optional` promptDelay: number
  - `Optional` moveToTop: boolean

  #### Returns void

  Overrides default.showText

  - Defined in src/ui/pokedex-ui-handler.ts:756

### startIconAnimation

- startIconAnimation(cursor: number): void

  #### Parameters

  - cursor: number

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2025

### stopIconAnimation

- stopIconAnimation(cursor: number): void

  #### Parameters

  - cursor: number

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2038

### tryExit

- tryExit(): boolean

  #### Returns boolean

  - Defined in src/ui/pokedex-ui-handler.ts:2266

### updateButtonIcon

- updateButtonIcon(
  iconSetting: any,
  gamepadType: any,
  iconElement: any,
  controlLabel: any,
  ): void

  #### Parameters

  - iconSetting: any
  - gamepadType: any
  - iconElement: any
  - controlLabel: any

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:1268

### updateCandyUpgradeDisplay

- updateCandyUpgradeDisplay(pokemonContainer: PokedexMonContainer ): void

  Update the display of candy upgrade icons or animations for the given PokedexMonContainer

  #### Parameters

  - pokemonContainer: PokedexMonContainer

    the container for the Pokemon to update

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:956

### updateFilterButtonIcon

- updateFilterButtonIcon(
  iconSetting: any,
  gamepadType: any,
  iconElement: any,
  controlLabel: any,
  ): void

  #### Parameters

  - iconSetting: any
  - gamepadType: any
  - iconElement: any
  - controlLabel: any

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:1296

### updateScroll

- updateScroll(): void

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:1714

### updateStarters

- updateStarters(): void

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:1334

### updateStarterValueLabel

- updateStarterValueLabel(starter: PokedexMonContainer ): void

  #### Parameters

  - starter: PokedexMonContainer

  #### Returns void

  - Defined in src/ui/pokedex-ui-handler.ts:2237