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

# Class default

Handles all the UI for choosing optional challenges.

#### Hierarchy (View Summary)

- default
  - default

- Defined in src/ui/challenges-select-ui-handler.ts:19

##### Index

### Constructors

constructor

### Properties

active
cursor
mode

### Methods

clear
destroy
eraseCursor
getActiveChallenge
getCursor
getTextColor
getUi
initLabels
processInput
setCursor
setDescription
setMouseCursorStyle
setScrollCursor
setup
show
updateChallengeArrows
updateText

## Constructors

### constructor

- new default(mode?: null | Mode ): default

  #### Parameters

  - mode: null | Mode = null

  #### Returns default

  Overrides default.constructor

  - Defined in src/ui/challenges-select-ui-handler.ts:53

## Properties

### active

active: boolean = false

Inherited from default.active

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

### `Protected` cursor

cursor: number = 0

Inherited from default.cursor

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

### `Protected` mode

mode: null | number

Inherited from default.mode

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

## Methods

### clear

- clear(): void

  #### Returns void

  Overrides default.clear

  - Defined in src/ui/challenges-select-ui-handler.ts:528

### destroy

- destroy(): void

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

  #### Returns void

  Inherited from default.destroy

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

### eraseCursor

- eraseCursor(): void

  #### Returns void

  - Defined in src/ui/challenges-select-ui-handler.ts:534

### getActiveChallenge

- getActiveChallenge(): Challenge

  #### Returns Challenge

  - Defined in src/ui/challenges-select-ui-handler.ts:524

### getCursor

- getCursor(): number

  #### Returns number

  Inherited from default.getCursor

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

### 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

### initLabels

- initLabels(): void

  initLabels init all challenge labels

  #### Returns void

  - Defined in src/ui/challenges-select-ui-handler.ts:235

### processInput

- processInput(button: Button ): boolean

  Processes input from a specified button. This method handles navigation through a UI menu, including movement through menu items and handling special actions like cancellation. Each button press may adjust the cursor position or the menu scroll, and plays a sound effect if the action was successful.

  #### Parameters

  - button: Button

    The button pressed by the user.

  #### Returns boolean

  `true` if the action associated with the button was successfully processed, `false` otherwise.

  Overrides default.processInput

  - Defined in src/ui/challenges-select-ui-handler.ts:372

### setCursor

- setCursor(cursor: number): boolean

  #### Parameters

  - cursor: number

  #### Returns boolean

  Overrides default.setCursor

  - Defined in src/ui/challenges-select-ui-handler.ts:484

### setDescription

- setDescription(text: string): void

  Adds the default text color to the description text

  #### Parameters

  - text: string

    text to set to the BBCode description

  #### Returns void

  - Defined in src/ui/challenges-select-ui-handler.ts:227

### `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

### setScrollCursor

- setScrollCursor(scrollCursor: number): boolean

  #### Parameters

  - scrollCursor: number

  #### Returns boolean

  - Defined in src/ui/challenges-select-ui-handler.ts:512

### setup

- setup(): void

  #### Returns void

  Overrides default.setup

  - Defined in src/ui/challenges-select-ui-handler.ts:57

### show

- show(args: any[]): boolean

  #### Parameters

  - args: any[]

  #### Returns boolean

  Overrides default.show

  - Defined in src/ui/challenges-select-ui-handler.ts:328

### updateChallengeArrows

- updateChallengeArrows(tinted: boolean): void

  #### Parameters

  - tinted: boolean

  #### Returns void

  - Defined in src/ui/challenges-select-ui-handler.ts:350

### updateText

- updateText(): void

  update the text the cursor is on

  #### Returns void

  - Defined in src/ui/challenges-select-ui-handler.ts:265