Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Menu

Index

Constructors

constructor

  • new Menu(title: string, subtitle: string, offset?: Point, spriteLibrary?: string, spriteName?: string): Menu
  • Parameters

    • title: string
    • subtitle: string
    • offset: Point = ...
    • spriteLibrary: string = 'commonmenu'
    • spriteName: string = 'interaction_bgd'

    Returns Menu

Properties

Private _activeItem

_activeItem: number = 1000

Private _alignment

_alignment: MenuAlignment = MenuAlignment.Left

Private Readonly _background

_background: Sprite

Private _controls

_controls: MenuControls = ...

Private _counterOverride

_counterOverride: string = ''

Private _counterPretext

_counterPretext: string = ''

Private Readonly _counterText

_counterText: Text

Private Readonly _descriptionBar

_descriptionBar: Rectangle

Private Readonly _descriptionRectangle

_descriptionRectangle: Sprite

Private Readonly _descriptionText

_descriptionText: Text

Private _drawOffset

_drawOffset: Point = ...

Private Readonly _extraRectangleDown

_extraRectangleDown: Rectangle

Private Readonly _extraRectangleUp

_extraRectangleUp: Rectangle

Private _justOpened

_justOpened: boolean = true

Private _lastLeftRightNavigation

_lastLeftRightNavigation: number = 0

Private _lastUpDownNavigation

_lastUpDownNavigation: number = 0

Private Readonly _logo

_logo: Sprite

Private Readonly _mainMenu

_mainMenu: Container

Private _maxItem

_maxItem: number = 9

Private _maxItemsOnScreen

_maxItemsOnScreen: number = ...

Private _minItem

_minItem: number = 0

Private _mousePressed

_mousePressed: boolean = false

Private _navigationDelay

_navigationDelay: number = 140

Private _offset

_offset: Point

Private _settings

_settings: MenuSettings = ...

Private Readonly _subtitle

_subtitle: Text

Private Readonly _subtitleResRectangle

_subtitleResRectangle: Rectangle

Private Readonly _title

_title: Text

Private Readonly _upAndDownSprite

_upAndDownSprite: Sprite

Private _widthOffset

_widthOffset: number = 0

Readonly checkboxChange

checkboxChange: LiteEvent = ...

children

children: Map<string, Menu> = ...

Readonly id

id: string = ...

Readonly indexChange

indexChange: LiteEvent = ...

Readonly itemSelect

itemSelect: LiteEvent = ...

items

items: UIMenuItem[] = []

Readonly listChange

listChange: LiteEvent = ...

Readonly listSelect

listSelect: LiteEvent = ...

Readonly menuChange

menuChange: LiteEvent = ...

Readonly menuClose

menuClose: LiteEvent = ...

Readonly menuOpen

menuOpen: LiteEvent = ...

Readonly panelActivated

panelActivated: LiteEvent = ...

parentItem

parentItem: undefined | UIMenuItem

parentMenu

parentMenu: undefined | Menu

Readonly sliderChange

sliderChange: LiteEvent = ...

Readonly sliderSelect

sliderSelect: LiteEvent = ...

visible

visible: boolean = false

Static screenAspectRatio

screenAspectRatio: number = ...

Static screenHeight

screenHeight: number = 1080

Static screenResolution

screenResolution: Size = ...

Static screenWidth

screenWidth: number = ...

Accessors

Alignment

Controls

CurrentItem

CurrentSelection

  • get CurrentSelection(): number
  • set CurrentSelection(v: number): void

DrawOffset

Settings

Subtitle

  • get Subtitle(): string
  • set Subtitle(text: string): void

SubtitleBackColor

  • get SubtitleBackColor(): Color
  • set SubtitleBackColor(color: Color): void

SubtitleFont

  • get SubtitleFont(): Font
  • set SubtitleFont(font: Font): void

SubtitleForeColor

  • get SubtitleForeColor(): Color
  • set SubtitleForeColor(color: Color): void

Title

  • get Title(): string
  • set Title(text: string): void

TitleFont

  • get TitleFont(): Font
  • set TitleFont(font: Font): void

WidthOffset

  • get WidthOffset(): number
  • set WidthOffset(widthOffset: number): void

Methods

Private _calculateItemHeight

  • _calculateItemHeight(): number

Private _calculatePanelPosition

  • _calculatePanelPosition(hasDescription: boolean): number

Private _disEnableControls

  • _disEnableControls(): void

Private _isThereAnyItemExcludingSeparators

  • _isThereAnyItemExcludingSeparators(): boolean

Private _playSoundAndReleaseId

  • _playSoundAndReleaseId(sound: string, set?: string): void

Private _processControl

  • _processControl(): void

Private _processMouse

  • _processMouse(): void

Private _recalculateDescriptionPosition

  • _recalculateDescriptionPosition(): void

Private _recalculateUpAndDown

  • _recalculateUpAndDown(): void

Private _render

  • _render(): void

addItem

addNewSubMenu

  • addNewSubMenu(text: string, description?: string, inherit?: boolean): Menu
  • Parameters

    • text: string
    • Optional description: string
    • inherit: boolean = true

    Returns Menu

addSubMenu

  • addSubMenu(subMenuToAdd: Menu, text: string, description?: string, inherit?: boolean): Menu

bindMenuToItem

clear

  • clear(): void

close

  • close(): void

goBack

  • goBack(): void

goDown

  • goDown(): void

goLeft

  • goLeft(): void

goRight

  • goRight(): void

goUp

  • goUp(): void

isMouseInBounds

  • isMouseInBounds(pos: Point, size: Size, drawOffset?: boolean): boolean

open

  • open(): void

refreshIndex

  • refreshIndex(): void

releaseMenuFromItem

  • releaseMenuFromItem(releaseFrom: UIMenuItem): boolean

removeItem

  • removeItem(itemOrIndex: number | UIMenuItem): void

selectItem

  • selectItem(): void

Generated using TypeDoc