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

- FormModalUiHandler
  - default

- Defined in src/ui/admin-ui-handler.ts:14

##### Index

### Constructors

constructor

### Properties

active
buttonBgs
buttonContainers
buttonLabels
cursor
editing
errorMessage
formLabels
inputContainers
inputs
modalBg
modalContainer
mode
submitAction
titleText
tween

### Methods

addInteractionHoverEffect
clear
destroy
getButtonLabels
getButtonTopMargin
getCursor
getHeight
getInputFieldConfigs
getMargin
getModalTitle
getReadableErrorMessage
getTextColor
getUi
getWidth
processInput
sanitizeInputs
setCursor
setMouseCursorStyle
setup
show
showMessage
updateContainer
updateFields

## Constructors

### constructor

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

  #### Parameters

  - mode: null | Mode = null

  #### Returns default

  Overrides FormModalUiHandler.constructor

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

## Properties

### active

active: boolean = false

Inherited from FormModalUiHandler.active

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

### `Protected` buttonBgs

buttonBgs: NineSlice[]

Inherited from FormModalUiHandler.buttonBgs

- Defined in src/ui/modal-ui-handler.ts:17

### `Protected` buttonContainers

buttonContainers: Container[]

Inherited from FormModalUiHandler.buttonContainers

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

### `Protected` buttonLabels

buttonLabels: Text[]

Inherited from FormModalUiHandler.buttonLabels

- Defined in src/ui/modal-ui-handler.ts:18

### `Protected` cursor

cursor: number = 0

Inherited from FormModalUiHandler.cursor

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

### `Protected` editing

editing: boolean

Inherited from FormModalUiHandler.editing

- Defined in src/ui/form-modal-ui-handler.ts:16

### `Protected` errorMessage

errorMessage: Text

Inherited from FormModalUiHandler.errorMessage

- Defined in src/ui/form-modal-ui-handler.ts:19

### `Protected` formLabels

formLabels: Text[]

Inherited from FormModalUiHandler.formLabels

- Defined in src/ui/form-modal-ui-handler.ts:22

### `Protected` inputContainers

inputContainers: Container[]

Inherited from FormModalUiHandler.inputContainers

- Defined in src/ui/form-modal-ui-handler.ts:17

### `Protected` inputs

inputs: InputText[]

Inherited from FormModalUiHandler.inputs

- Defined in src/ui/form-modal-ui-handler.ts:18

### `Protected` modalBg

modalBg: NineSlice

Inherited from FormModalUiHandler.modalBg

- Defined in src/ui/modal-ui-handler.ts:14

### `Protected` modalContainer

modalContainer: Container

Inherited from FormModalUiHandler.modalContainer

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

### `Protected` mode

mode: null | number

Inherited from FormModalUiHandler.mode

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

### `Protected` submitAction

submitAction: null | Function

Inherited from FormModalUiHandler.submitAction

- Defined in src/ui/form-modal-ui-handler.ts:20

### `Protected` titleText

titleText: Text

Inherited from FormModalUiHandler.titleText

- Defined in src/ui/modal-ui-handler.ts:15

### `Protected` tween

tween: Tween

Inherited from FormModalUiHandler.tween

- Defined in src/ui/form-modal-ui-handler.ts:21

## Methods

### `Protected` addInteractionHoverEffect

- addInteractionHoverEffect(gameObject: Sprite | Image | NineSlice): void

  Adds a hover effect to a game object which changes the cursor to a `pointer` and tints it slighly

  #### Parameters

  - gameObject: Sprite | Image | NineSlice

    the game object to add hover events/effects to

  #### Returns void

  Inherited from FormModalUiHandler.addInteractionHoverEffect

  - Defined in src/ui/modal-ui-handler.ts:186

### clear

- clear(): void

  #### Returns void

  Overrides FormModalUiHandler.clear

  - Defined in src/ui/admin-ui-handler.ts:407

### destroy

- destroy(): void

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

  #### Returns void

  Inherited from FormModalUiHandler.destroy

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

### getButtonLabels

- getButtonLabels(): string[]

  #### Returns string[]

  Overrides FormModalUiHandler.getButtonLabels

  - Defined in src/ui/admin-ui-handler.ts:49

### getButtonTopMargin

- getButtonTopMargin(): number

  #### Returns number

  Inherited from FormModalUiHandler.getButtonTopMargin

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

### getCursor

- getCursor(): number

  #### Returns number

  Inherited from FormModalUiHandler.getCursor

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

### getHeight

- getHeight(config?: ModalConfig ): number

  #### Parameters

  - `Optional` config: ModalConfig

  #### Returns number

  Inherited from FormModalUiHandler.getHeight

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

### getInputFieldConfigs

- getInputFieldConfigs(): InputFieldConfig []

  Get configuration for all fields that should be part of the modal Gets used by `updateFields` to add the proper text inputs and labels to the view

  #### Returns InputFieldConfig []

  array of `InputFieldConfig`

  Overrides FormModalUiHandler.getInputFieldConfigs

  - Defined in src/ui/admin-ui-handler.ts:62

### getMargin

- getMargin(): [number, number, number, number]

  #### Returns [number, number, number, number]

  Overrides FormModalUiHandler.getMargin

  - Defined in src/ui/admin-ui-handler.ts:45

### getModalTitle

- getModalTitle(): string

  #### Returns string

  Overrides FormModalUiHandler.getModalTitle

  - Defined in src/ui/admin-ui-handler.ts:37

### getReadableErrorMessage

- getReadableErrorMessage(error: string): string

  #### Parameters

  - error: string

  #### Returns string

  Inherited from FormModalUiHandler.getReadableErrorMessage

  - Defined in src/ui/form-modal-ui-handler.ts:50

### getTextColor

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

  #### Parameters

  - style: TextStyle
  - shadow: boolean = false

  #### Returns string

  Inherited from FormModalUiHandler.getTextColor

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

### getUi

- getUi(): default

  #### Returns default

  Inherited from FormModalUiHandler.getUi

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

### getWidth

- getWidth(): number

  #### Returns number

  Overrides FormModalUiHandler.getWidth

  - Defined in src/ui/admin-ui-handler.ts:41

### processInput

- processInput(button: Button ): boolean

  #### Parameters

  - button: Button

  #### Returns boolean

  Overrides FormModalUiHandler.processInput

  - Defined in src/ui/admin-ui-handler.ts:97

### sanitizeInputs

- sanitizeInputs(): void

  #### Returns void

  Inherited from FormModalUiHandler.sanitizeInputs

  - Defined in src/ui/form-modal-ui-handler.ts:159

### setCursor

- setCursor(cursor: number): boolean

  #### Parameters

  - cursor: number

  #### Returns boolean

  Inherited from FormModalUiHandler.setCursor

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

### `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 FormModalUiHandler.setMouseCursorStyle

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

### setup

- setup(): void

  #### Returns void

  Inherited from FormModalUiHandler.setup

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

### show

- show(args: any[]): boolean

  #### Parameters

  - args: any[]

  #### Returns boolean

  Overrides FormModalUiHandler.show

  - Defined in src/ui/admin-ui-handler.ts:106

### showMessage

- showMessage(
  message: string,
  adminResult: AdminSearchInfo,
  isError: boolean,
  ): void

  #### Parameters

  - message: string
  - adminResult: AdminSearchInfo
  - isError: boolean

  #### Returns void

  - Defined in src/ui/admin-ui-handler.ts:175

### updateContainer

- updateContainer(config?: ModalConfig ): void

  #### Parameters

  - `Optional` config: ModalConfig

  #### Returns void

  Inherited from FormModalUiHandler.updateContainer

  - Defined in src/ui/form-modal-ui-handler.ts:165

### `Protected` updateFields

- updateFields(fieldsConfig: InputFieldConfig [], hasTitle: boolean): void

  #### Parameters

  - fieldsConfig: InputFieldConfig []
  - hasTitle: boolean

  #### Returns void

  Inherited from FormModalUiHandler.updateFields

  - Defined in src/ui/form-modal-ui-handler.ts:81