Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new UIMenuItem(text: string, description?: string): UIMenuItem

Properties

Private _backColor

_backColor: Color = UIMenuItem.defaultBackColor

Private _description

_description: string = ''

Private _event

_event: { args: unknown[]; event: string } = ...

Type declaration

  • args: unknown[]
  • event: string

Private _foreColor

_foreColor: Color = UIMenuItem.defaultForeColor

Private _formattedDescription

_formattedDescription: string = ''

Private _highlightedBackColor

_highlightedBackColor: Color = UIMenuItem.defaultHighlightedBackColor

Private _highlightedForeColor

_highlightedForeColor: Color = UIMenuItem.defaultHighlightedForeColor

Private _leftBadge

_leftBadge: BadgeStyle = BadgeStyle.None

Private _panels

_panels: AbstractUIMenuPanel[] = []

Private _rightBadge

_rightBadge: BadgeStyle = BadgeStyle.None

Readonly activated

activated: LiteEvent = ...

Protected Readonly badgeLeft

badgeLeft: Sprite

Protected Readonly badgeRight

badgeRight: Sprite

enabled

enabled: boolean = true

hovered

hovered: boolean = false

Readonly id

id: string = ...

Protected Readonly labelText

labelText: Text

offset

offset: Point = ...

Readonly panelActivated

panelActivated: LiteEvent = ...

parent

parent: undefined | Menu

Protected Readonly rectangle

rectangle: Rectangle

selected

selected: boolean = false

Protected Readonly selectedSprite

selectedSprite: Sprite

Protected supportsDescription

supportsDescription: boolean = true

Protected supportsLeftBadge

supportsLeftBadge: boolean = true

Protected supportsPanels

supportsPanels: boolean = true

Protected supportsRightBadge

supportsRightBadge: boolean = true

Protected supportsRightLabel

supportsRightLabel: boolean = true

Protected Readonly text

text: Text

Static defaultBackColor

defaultBackColor: Color = Color.empty

Static defaultForeColor

defaultForeColor: Color = Color.whiteSmoke

Static defaultHighlightedBackColor

defaultHighlightedBackColor: Color = Color.white

Static defaultHighlightedForeColor

defaultHighlightedForeColor: Color = Color.black

Static defaultHoveredBackColor

defaultHoveredBackColor: Color = ...

Static defaultHoveredForeColor

defaultHoveredForeColor: Color = UIMenuItem.defaultForeColor

Accessors

BackColor

  • get BackColor(): Color
  • set BackColor(value: Color): void

Description

  • get Description(): string
  • set Description(value: string): void

ForeColor

  • get ForeColor(): Color
  • set ForeColor(value: Color): void

FormattedDescription

  • get FormattedDescription(): string

HighlightedBackColor

  • get HighlightedBackColor(): Color
  • set HighlightedBackColor(value: Color): void

HighlightedForeColor

  • get HighlightedForeColor(): Color
  • set HighlightedForeColor(value: Color): void

IsMouseInBounds

  • get IsMouseInBounds(): boolean

LeftBadge

Panels

RightBadge

RightLabel

  • get RightLabel(): string
  • set RightLabel(value: string): void

Text

  • get Text(): string
  • set Text(value: string): void

Methods

addEvent

  • addEvent(event: string, ...args: unknown[]): void

addPanel

badgeToColor

badgeToTextureName

draw

  • draw(): void

findPanelIndex

fireEvent

  • fireEvent(): void

formatDescription

  • formatDescription(): void

removePanel

setVerticalPosition

  • setVerticalPosition(y: number): void

Static badgeToTextureDict

Static getBadgeSize

Static getBadgeSpriteHeightOffset

  • getBadgeSpriteHeightOffset(sprite: Sprite): number

Static getBadgeSpriteWidthOffset

  • getBadgeSpriteWidthOffset(sprite: Sprite): number

Generated using TypeDoc