Skip to main content

_DialogExpressionMenu <ModeType>

Hierarchy

Index

Constructors

constructor

  • Parameters

    • mode: ModeType

      The name of the mode associated with this instance

    Returns _DialogExpressionMenu<ModeType>

Properties

inherited_initProperties

_initProperties: { C: PlayerCharacter } = null

An object for storing all of this classes init properties.

Subclasses should generally implement a public getter/setter interface for safely manipulating each property stored herein.


Type declaration

abstractreadonlyinherited_initPropertyNames

_initPropertyNames: readonly [C] = ...

A list of all init property names as supported by this class. Represents the set of keys that will be stored in _initProperties

clickStatusCallbacks

clickStatusCallbacks: { CharacterIsExpressionAllowed: (C, clickedItem, equippedItem) => string } = ...

Type declaration

  • CharacterIsExpressionAllowed: (C, clickedItem, equippedItem) => string

readonlyinheriteddefaultShape

defaultShape: readonly [15, 15, 500, 940] = ...

The default position & shape of the current subscreen as defined by the root element.

See DialogMenu.shape.

inheritedeventListeners

eventListeners: { _ClickButton: (this, ev) => string; _ClickDisabledButton: (this, ev) => string; _ClickPaginateNext: (this, ev) => void; _ClickPaginatePrev: (this, ev) => void; _WheelGrid: (this, event) => void; _ClickDisabledMenuButton: any; _ClickMenuButton: any; _expressionRadioGroupClick: any }

Type declaration

  • _ClickButton: (this, ev) => string
      • (this, ev): string

      • Parameters

        • this: HTMLButtonElement
        • ev: MouseEvent

        Returns string

        A status message if an unexpected error is encountered and null otherwise

  • _ClickDisabledButton: (this, ev) => string
      • (this, ev): string

      • Parameters

        • this: HTMLButtonElement
        • ev: MouseEvent

        Returns string

        A status message if an expected error is encountered and null otherwise

  • _ClickPaginateNext: (this, ev) => void
      • (this, ev): void
      • Parameters

        • this: HTMLButtonElement
        • ev: MouseEvent

        Returns void

  • _ClickPaginatePrev: (this, ev) => void
      • (this, ev): void
      • Parameters

        • this: HTMLButtonElement
        • ev: MouseEvent

        Returns void

  • _WheelGrid: (this, event) => void

    Provide more consistent mouse wheel scroll behavior by using browser-independent increments.

      • (this, event): void
      • Parameters

        • this: HTMLDivElement
        • event: WheelEvent

        Returns void

  • _ClickDisabledMenuButton: function
    • _ClickDisabledMenuButton(this, ev): void

    • Parameters

      • this: HTMLButtonElement
      • ev: MouseEvent

      Returns void

  • _ClickMenuButton: function
    • _ClickMenuButton(this, ev): void

    • Parameters

      • this: HTMLButtonElement
      • ev: MouseEvent

      Returns void

  • _expressionRadioGroupClick: function
    • _expressionRadioGroupClick(this, ev): void

    • Parameters

      • this: HTMLButtonElement
      • ev: MouseEvent

      Returns void

abstractreadonlyids

ids: Readonly<{ grid: dialog-expression-button-grid; menubar: dialog-expression-menubar; menuLeft: dialog-expression-menu-left; root: dialog-expression; status: dialog-expression-status }> = ...

An object containing all DOM element IDs referenced in the DialogMenu subclass.

inheritedmenubarEventListeners

menubarEventListeners: { blindness: MenuButtonData<{ C: PlayerCharacter }>; blink: MenuButtonData<{ C: PlayerCharacter }>; clear: MenuButtonData<{ C: PlayerCharacter }>; color: MenuButtonData<{ C: PlayerCharacter }>; next: MenuButtonData<{ C: PlayerCharacter }> }

Type declaration

readonlyinheritedmode

mode: ModeType

The name of the mode associated with this instance (see DialogMenuMode).

Accessors

inheritedC

  • get C(): PropType[C]
  • set C(value): void
  • Get or set the currently selected character.

    Performs a hard DialogMenu.Reload if a new character is assigned.


    Returns PropType[C]

  • Parameters

    • value: PropType[C]

    Returns void

facialExpressions

  • Get an object with all UI-configurable expression group names mapped to their respective expressions.


    Returns Readonly<Partial<Record<keyof ExpressionNameMap, readonly ExpressionName[]>>>

focusGroup

inheritedshape

  • Get or set the position & shape of the current subscreen as defined by the root element.

    Performs a DialogMenu.Resize if a new shape is assigned.


    Returns RectTuple

  • Parameters

    Returns void

Methods

abstract_ClickButton

  • _ClickButton(button, C, clickedObj, equippedItem): void
  • Helper function for handling the clicks of successfully validated grid button clicks.


    Parameters

    • button: HTMLButtonElement

      The clicked button

    • C: Character

      The target character

    • clickedObj: ExpressionPair

      The buttons underlying object (item or activity)

    • equippedItem: Item

      The currently equipped item

    Returns void

inherited_ConstructPaginateButtons

  • _ConstructPaginateButtons(id): HTMLDivElement

  • Parameters

    • id: string

    Returns HTMLDivElement

abstract_GetClickedObject

  • Return the underlying item or activity object of the passed grid button.


    Parameters

    • button: HTMLButtonElement

      The clicked button

    Returns ExpressionPair

    • The button's underlying item or activity object

abstract_Load

  • _Load(): HTMLElement
  • Construct and return the (unpopulated) DialogMenu.ids.root element.


    Returns HTMLElement

inherited_Reload

  • _Reload(param, options): boolean

abstract_ReloadButtonGrid

  • _ReloadButtonGrid(root, buttonGrid, properties, options): void

abstract_ReloadIcon

  • _ReloadIcon(root, icon, properties, options): void

abstract_ReloadMenubar

  • _ReloadMenubar(root, menubar, properties, options): void

abstract_ReloadStatus

  • _ReloadStatus(root, status, properties, options): void

inherited_ReloadValidate

inheritedClick

  • Click(event): void
  • Parameters

    • event: PointerEvent

    Returns void

inheritedDraw

  • Draw(): void
  • Returns void

inheritedExit

  • Exit(): void
  • Returns void

inheritedGetClickStatus

  • GetClickStatus(C, clickedObj, equippedItem): string
  • Return an error status (if any) for when an item or activity is clicked.

    Error statuses are used for evaluating whether the relevant grid buttons must be disabled or not.


    Parameters

    • C: Character

      The target character

    • clickedObj: ExpressionPair

      The item that is clicked

    • equippedItem: Item = null

      The item that is equipped (if any)

    Returns string

    • The error status or null if everything is ok

inheritedInit

  • Init(properties, style): HTMLDivElement
  • Initialize the DialogMenu subscreen.

    Serves as a ScreenLoadHandler wrapper with added parameters.


    Parameters

    Returns HTMLDivElement

    The div containing the dialog subscreen root element or null if the screen failed to initialize

inheritedIsAvailable

  • IsAvailable(C): boolean
  • Whether this self-menu is accessible via the "view next page" button.


    Parameters

    Returns boolean

inheritedKeyDown

  • KeyDown(event): boolean
  • Parameters

    • event: KeyboardEvent

    Returns boolean

inheritedLoad

  • Load(): Promise<void>
  • Returns Promise<void>

inheritedReload

  • Reload(properties, options): Promise<boolean>
  • Reload the subscreen, updating the DOM elements and, if required, re-assigning the character and focus group.


    Parameters

    Returns Promise<boolean>

    • Whether an update was triggered or aborted

inheritedResize

  • Resize(load): void
  • Parameters

    • load: boolean

    Returns void

inheritedRun

  • Run(time): void
  • Parameters

    • time: number

    Returns void

inheritedUnload

  • Unload(): void
  • Returns void