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

# Class default

Abstract class for handling UI elements related to settings.

#### Hierarchy (View Summary)

- default
  - default

- Defined in src/ui/settings/settings-display-ui-handler.ts:6

##### Index

### Constructors

constructor

### Properties

active
awaitingActionInput
cursor
localStorageKey
message
mode
navigationIcons
onActionInput
pendingPrompt
prompt
rowsToDisplay
settings
textCallbackTimer
textTimer
title
tutorialActive
tutorialOverlay

### Methods

activateSetting
clear
clearText
destroy
eraseCursor
getCursor
getTextColor
getUi
initPromptSprite
initTutorialOverlay
isTextAnimationInProgress
processInput
processTutorialInput
setCursor
setMouseCursorStyle
setOptionCursor
setScrollCursor
setup
show
showDialogue
showPrompt
showText
updateBindings
updateSettingsScroll

## Constructors

### constructor

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

  Creates an instance of SettingsGamepadUiHandler.

  #### Parameters

  - mode: null | Mode = null

    The UI mode, optional.

  #### Returns default

  Overrides default.constructor

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

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

cursor: number = 0

Inherited from default.cursor

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

### `Protected` localStorageKey

localStorageKey: string

Inherited from default.localStorageKey

- Defined in src/ui/settings/abstract-settings-ui-handler.ts:43

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

navigationIcons: InputsIcons

Inherited from default.navigationIcons

- Defined in src/ui/settings/abstract-settings-ui-handler.ts:33

### `Protected` onActionInput

onActionInput: null | Function

Inherited from default.onActionInput

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

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

rowsToDisplay: number

Inherited from default.rowsToDisplay

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

### `Protected` settings

settings: Setting []

Inherited from default.settings

- Defined in src/ui/settings/abstract-settings-ui-handler.ts:42

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

### `Protected` title

title: string

Inherited from default.title

- Defined in src/ui/settings/abstract-settings-ui-handler.ts:41

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

### activateSetting

- activateSetting(setting: Setting ): boolean

  Activate the specified setting if it is activatable.

  #### Parameters

  - setting: Setting

    The setting to activate.

  #### Returns boolean

  Whether the setting was successfully activated.

  Inherited from default.activateSetting

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:347

### clear

- clear(): void

  Clear the UI elements and state.

  #### Returns void

  Inherited from default.clear

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:477

### clearText

- clearText(): void

  #### Returns void

  Inherited from default.clearText

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

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

  Erase the cursor from the UI.

  #### Returns void

  Inherited from default.eraseCursor

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:492

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

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

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

### isTextAnimationInProgress

- isTextAnimationInProgress(): boolean

  #### Returns boolean

  Inherited from default.isTextAnimationInProgress

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

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

  Inherited from default.processInput

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:262

### processTutorialInput

- processTutorialInput(button: Button ): boolean

  #### Parameters

  - button: Button

  #### Returns boolean

  Inherited from default.processTutorialInput

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

### setCursor

- setCursor(cursor: number): boolean

  Set the cursor to the specified position.

  #### Parameters

  - cursor: number

    The cursor position to set.

  #### Returns boolean

  `true` if the cursor was set successfully.

  Inherited from default.setCursor

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:362

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

### setOptionCursor

- setOptionCursor(settingIndex: number, cursor: number, save?: boolean): boolean

  Set the option cursor to the specified position.

  #### Parameters

  - settingIndex: number

    The index of the setting or -1 to change the current setting

  - cursor: number

    The cursor position to set.

  - `Optional` save: boolean

    Whether to save the setting to local storage.

  #### Returns boolean

  `true` if the option cursor was set successfully.

  Inherited from default.setOptionCursor

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:385

### setScrollCursor

- setScrollCursor(scrollCursor: number): boolean

  Set the scroll cursor to the specified position.

  #### Parameters

  - scrollCursor: number

    The scroll cursor position to set.

  #### Returns boolean

  `true` if the scroll cursor was set successfully.

  Inherited from default.setScrollCursor

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:444

### setup

- setup(): void

  Setup UI elements

  #### Returns void

  Inherited from default.setup

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:55

### show

- show(args: any[]): boolean

  Show the UI with the provided arguments.

  #### Parameters

  - args: any[]

    Arguments to be passed to the show method.

  #### Returns boolean

  `true` if successful.

  Inherited from default.show

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:230

### 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,
  ): void

  #### Parameters

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

  #### Returns void

  Inherited from default.showText

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:499

### updateBindings

- updateBindings(): void

  Update the bindings for the current active device configuration.

  #### Returns void

  Inherited from default.updateBindings

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:203

### updateSettingsScroll

- updateSettingsScroll(): void

  Update the scroll position of the settings UI.

  #### Returns void

  Inherited from default.updateSettingsScroll

  - Defined in src/ui/settings/abstract-settings-ui-handler.ts:462