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

# Class default

Abstract class for handling UI elements related to settings.

#### Hierarchy (view full)

- default
  - default
    - default
    - default
    - default

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

#####
Index

### Constructors

constructor

### Properties

active
cursor
cursorObj
localStorageKey
mode
navigationContainer
navigationIcons
optionCursors
optionValueLabels
optionsBg
optionsContainer
reloadRequired
reloadSettings
rowsToDisplay
scene
scrollCursor
settingLabels
settings
settingsContainer
title

### Methods

clear
eraseCursor
getCursor
getTextColor
getUi
processInput
setCursor
setOptionCursor
setScrollCursor
setup
show
updateBindings
updateSettingsScroll

## Constructors

### constructor

- new default(scene, mode?): default

- #### Parameters

  - scene: default
  - `Optional` mode: Mode

  #### Returns default

  Overrides default.constructor

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

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

### `Private` cursorObj

cursorObj: NineSlice

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

### `Protected` localStorageKey

localStorageKey: string

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

### `Protected` mode

mode: number

Inherited from default.mode

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

### `Private` navigationContainer

navigationContainer: default

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

### `Protected` navigationIcons

navigationIcons: InputsIcons

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

### `Private` optionCursors

optionCursors: number[]

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

### `Private` optionValueLabels

optionValueLabels: Text[][]

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

### `Private` optionsBg

optionsBg: NineSlice

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

### `Private` optionsContainer

optionsContainer: Container

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

### `Private` reloadRequired

reloadRequired: boolean

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

### `Private` reloadSettings

reloadSettings: Setting []

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

### `Protected` rowsToDisplay

rowsToDisplay: number

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

### `Protected` scene

scene: default

Inherited from default.scene

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

### `Private` scrollCursor

scrollCursor: number

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

### `Private` settingLabels

settingLabels: Text[]

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

### `Protected` settings

settings: Setting []

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

### `Private` settingsContainer

settingsContainer: Container

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

### `Protected` title

title: string

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

## Methods

### clear

- clear(): void

- Clear the UI elements and state.

  #### Returns void

  Overrides default.clear

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

### eraseCursor

- eraseCursor(): void

- Erase the cursor from the UI.

  #### Returns void

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

### getCursor

- getCursor(): number

- #### Returns number

  Inherited from default.getCursor

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

### getTextColor

- getTextColor(style, shadow?): string

- #### Parameters

  - style: TextStyle
  - shadow: boolean = false

  #### Returns string

  Inherited from default.getTextColor

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

### getUi

- getUi(): default

- #### Returns default

  Inherited from default.getUi

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

### processInput

- processInput(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/settings/abstract-settings-ui-handler.ts:206

### setCursor

- setCursor(cursor): 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.

  Overrides default.setCursor

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

### setOptionCursor

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

- Set the option cursor to the specified position.

  #### Parameters

  - settingIndex: number

    The index of the 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.

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

### setScrollCursor

- setScrollCursor(scrollCursor): 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.

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

### setup

- setup(): void

- Setup UI elements

  #### Returns void

  Overrides default.setup

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

### show

- show(args): boolean

- Show the UI with the provided arguments.

  #### Parameters

  - args: any[]

    Arguments to be passed to the show method.

  #### Returns boolean

  `true` if successful.

  Overrides default.show

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

### updateBindings

- updateBindings(): void

- Update the bindings for the current active device configuration.

  #### Returns void

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

### updateSettingsScroll

- updateSettingsScroll(): void

- Update the scroll position of the settings UI.

  #### Returns void

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