_DialogPermissionMenu <T>
Hierarchy
- _DialogFocusMenu
- _DialogPermissionMenu
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
mode: T
Returns _DialogPermissionMenu<T>
Properties
inherited_initProperties
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
C: Character
focusGroup: AssetItemGroup
abstractreadonly_initPropertyNames
A list of all init property names as supported by this class. Represents the set of keys that will be stored in _initProperties
clickStatusCallbacks
readonlyinheriteddefaultShape
The default position & shape of the current subscreen as defined by the root element.
See DialogMenu.shape.
inheritedeventListeners
An object containing all event listeners referenced in the DialogMenu subclass.
Type declaration
_ClickButton: (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
Parameters
this: HTMLButtonElement
ev: MouseEvent
Returns string
A status message if an expected error is encountered and null otherwise
_ClickPaginateNext: (this, ev) => void
Parameters
this: HTMLButtonElement
ev: MouseEvent
Returns void
_ClickPaginatePrev: (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.
Parameters
this: HTMLDivElement
event: WheelEvent
Returns void
abstractreadonlyids
An object containing all DOM element IDs referenced in the DialogMenu subclass.
readonlyinheritedmode
The name of the mode associated with this instance (see DialogMenuMode).
Accessors
inheritedC
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
inheritedfocusGroup
Get or set the currently selected group.
Performs a hard DialogMenu.Reload if a new focus group is assigned.
Returns AssetItemGroup
Get or set the currently selected group.
Performs a hard DialogMenu.Reload if a new focus group is assigned.
Parameters
value: AssetItemGroup
Returns void
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
value: RectTuple
Returns void
Methods
abstract_ClickButton
Helper function for handling the clicks of successfully validated grid button clicks.
Parameters
button: HTMLButtonElement
The clicked button
C: Character
The target character
clickedObj: DialogInventoryItem
The buttons underlying object (item or activity)
equippedItem: Item
The currently equipped item
Returns void
inherited_ConstructPaginateButtons
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 DialogInventoryItem
- The button's underlying item or activity object
abstract_Load
Construct and return the (unpopulated) DialogMenu.ids.root element.
Returns HTMLElement
inherited_Reload
Parameters
param: ReloadParam<any>
options: ReloadOptions
Returns boolean
abstract_ReloadButtonGrid
A DialogMenu.Reload helper function for reloading DialogMenu.ids.grid elements.
Parameters
root: HTMLElement
buttonGrid: HTMLElement
properties: { C: Character; focusGroup: AssetItemGroup }
C: Character
focusGroup: AssetItemGroup
options: Pick<ReloadOptions, reset | resetScrollbar | resetDialogItems>
Returns void
abstract_ReloadIcon
A DialogMenu.Reload helper function for reloading DialogMenu.ids.icon elements.
Parameters
root: HTMLElement
icon: HTMLElement
properties: { C: Character; focusGroup: AssetItemGroup }
C: Character
focusGroup: AssetItemGroup
options: Pick<ReloadOptions, never>
Returns void
abstract_ReloadMenubar
A DialogMenu.Reload helper function for reloading DialogMenu.ids.menubar elements.
Parameters
root: HTMLElement
menubar: HTMLElement
properties: { C: Character; focusGroup: AssetItemGroup }
C: Character
focusGroup: AssetItemGroup
options: Pick<ReloadOptions, reset>
Returns void
abstract_ReloadStatus
A DialogMenu.Reload helper function for reloading DialogMenu.ids.status elements.
Parameters
root: HTMLElement
status: HTMLElement
properties: { C: Character; focusGroup: AssetItemGroup }
C: Character
focusGroup: AssetItemGroup
options: Pick<ReloadOptions, status | statusTimer>
Returns void
inherited_ReloadValidate
Parameters
properties: Partial<{ C: Character; focusGroup: AssetItemGroup }>
Returns { param?: never; status: false } | { param: ReloadParam<{ C: Character; focusGroup: AssetItemGroup }>; status: true }
inheritedClick
Parameters
event: PointerEvent
Returns void
inheritedDraw
Returns void
inheritedExit
Returns void
inheritedGetClickStatus
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: DialogInventoryItem
The item that is clicked
equippedItem: Item = null
The item that is equipped (if any)
Returns string
- The error status or
nullif everything is ok
inheritedInit
Initialize the DialogMenu subscreen.
Serves as a ScreenLoadHandler wrapper with added parameters.
Parameters
properties: { C: Character; focusGroup: AssetItemGroup }
The to be initialized character and any other properties
C: Character
focusGroup: AssetItemGroup
style: { shape?: RectTuple } = null
Misc styling for the subscreen
optionalshape: RectTuple
Returns HTMLDivElement
The div containing the dialog subscreen root element or
nullif the screen failed to initialize
inheritedKeyDown
Parameters
event: KeyboardEvent
Returns boolean
inheritedLoad
Returns Promise<void>
inheritedReload
Reload the subscreen, updating the DOM elements and, if required, re-assigning the character and focus group.
Parameters
properties: Partial<{ C: Character; focusGroup: AssetItemGroup }> = null
optionaloptions: ReloadOptions = null
Further customization options
Returns Promise<boolean>
- Whether an update was triggered or aborted
inheritedResize
Parameters
load: boolean
Returns void
inheritedRun
Parameters
time: number
Returns void
inheritedUnload
Returns void
The name of the mode associated with this instance