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

# Class default`Abstract`

Abstract class for handling UI elements related to button bindings.

#### Hierarchy (View Summary)

- default
  - default
    - default
    - default

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

##### Index

### Constructors

constructor

### Properties

actionBg
actionLabel
actionsContainer
active
buttonPressed
cancelFn
cancelLabel
countdownTimer
cursor
listening
mode
newButtonIcon
optionSelectBg
optionSelectContainer
swapText
target
targetButtonIcon
timeLeftAutoClose
timerText
titleBg
unlockText

### Methods

clear
destroy
getCursor
getTextColor
getUi
getWindowHeight
getWindowWidth
manageAutoCloseTimer
onInputDown
processInput
setCursor
setMouseCursorStyle
setup
show
swapAction

## Constructors

### constructor

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

  Constructor for the AbstractBindingUiHandler.

  #### Parameters

  - mode: null | Mode = null

    The UI mode.

  #### Returns default

  Overrides default.constructor

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

## Properties

### `Protected` actionBg

actionBg: NineSlice

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

### `Protected` actionLabel

actionLabel: Text

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

### `Protected` actionsContainer

actionsContainer: Container

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

### active

active: boolean = false

Inherited from default.active

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

### `Protected` buttonPressed

buttonPressed: null | number = null

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

### `Protected` cancelFn

cancelFn: null | CancelFn

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

### `Protected` cancelLabel

cancelLabel: Text

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

### `Protected` countdownTimer

countdownTimer: any

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

### `Protected` cursor

cursor: number = 0

Inherited from default.cursor

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

### `Protected` listening

listening: boolean = false

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

### `Protected` mode

mode: null | number

Inherited from default.mode

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

### `Protected` newButtonIcon

newButtonIcon: Sprite

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

### `Protected` optionSelectBg

optionSelectBg: NineSlice

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

### `Protected` optionSelectContainer

optionSelectContainer: Container

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

### `Protected` swapText

swapText: Text

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

### `Protected` target

target: any

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

### `Protected` targetButtonIcon

targetButtonIcon: Sprite

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

### `Protected` timeLeftAutoClose

timeLeftAutoClose: number = 5

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

### `Protected` timerText

timerText: Text

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

### `Protected` titleBg

titleBg: NineSlice

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

### `Protected` unlockText

unlockText: Text

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

## Methods

### clear

- clear(): void

  Clear the UI elements and state.

  #### Returns void

  Overrides default.clear

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

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

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

### getWindowHeight

- getWindowHeight(): number

  Get the height of the window.

  #### Returns number

  The window height.

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

### getWindowWidth

- getWindowWidth(): number

  Get the width of the window.

  #### Returns number

  The window width.

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

### manageAutoCloseTimer

- manageAutoCloseTimer(): void

  #### Returns void

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

### onInputDown

- onInputDown(
  buttonIcon: string,
  assignedButtonIcon: null | string,
  type: string,
  ): void

  Handle input down events.

  #### Parameters

  - buttonIcon: string

    The icon of the button that was pressed.

  - assignedButtonIcon: null | string

    The icon of the button that is assigned.

  - type: string

    The type of button press.

  #### Returns void

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

### processInput

- processInput(button: Button ): boolean

  Process the input for the given button.

  #### Parameters

  - button: Button

    The button to process.

  #### Returns boolean

  `true` if the input was processed successfully.

  Overrides default.processInput

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

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

  Overrides default.setCursor

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

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

### setup

- setup(): void

  Setup UI elements.

  #### Returns void

  Overrides default.setup

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

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

  Overrides default.show

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

### `Abstract` swapAction

- swapAction(): boolean

  #### Returns boolean

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