Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ui

Hierarchy

Implements

Index

Constructors

constructor

  • new Ui(): Ui
  • Returns Ui

Properties

Readonly event

event: IEventEmitter<this, IUiEvents> = new EventEmitter<this, E>(this)

Readonly highlights

highlights: HighlightManager = new HighlightManager()

Readonly scale

scale: ScaleManager = new ScaleManager()

Readonly screens

screens: ScreenManager = new ScreenManager()

Readonly selection

selection: SelectionHandler = new SelectionHandler(() => this.screens.getTop<Screen & Partial<MenuScreen>>()?.visibleMenu)

Readonly tooltips

tooltips: TooltipManager = new TooltipManager()

Readonly viewport

viewport: Vector2 = new Vector2(window.innerWidth, window.innerHeight)

Accessors

windowHeight

  • get windowHeight(): number
  • Returns number

windowWidth

  • get windowWidth(): number
  • Returns number

Methods

addStylesheet

  • addStylesheet(path: string): void
  • Parameters

    • path: string

    Returns void

colorSupportsHQFontRendering

  • colorSupportsHQFontRendering(colorID?: string | null): boolean
  • Parameters

    • Optional colorID: string | null

    Returns boolean

hideLoadingInterrupt

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

interrupt

  • Returns a new interrupt factory with the given translation data.

    Parameters

    Returns InterruptFactory

  • Returns an interrupt factory that can only be used to create menus.

    Returns IInterruptMenuFactory

Protected onFullscreen

  • onFullscreen(): boolean
  • Returns boolean

Protected onGlobalSlotLoaded

  • onGlobalSlotLoaded(): void
  • Returns void

Protected onInterruptClosed

  • onInterruptClosed(): void
  • Returns void

Protected onLanguageChange

  • onLanguageChange(_: any, language: string): void
  • Parameters

    • _: any
    • language: string

    Returns void

Protected onMessage

  • onMessage(_: any, fullscreen: boolean): void
  • Parameters

    • _: any
    • fullscreen: boolean

    Returns void

Protected onReload

  • Parameters

    Returns boolean

Protected onReloadStylesheets

  • onReloadStylesheets(): boolean
  • Returns boolean

Protected onToggleDevMode

  • onToggleDevMode(): boolean
  • Returns boolean

Protected onToggleDevTools

  • onToggleDevTools(): boolean
  • Returns boolean

playSound

  • playSound(sound: SfxType | "activate" | "select" | "input" | "enable" | "disable"): void
  • Parameters

    • sound: SfxType | "activate" | "select" | "input" | "enable" | "disable"

    Returns void

refreshTranslations

  • refreshTranslations(...elements: Array<HTMLElement | IComponent | undefined>): void
  • Parameters

    • Rest ...elements: Array<HTMLElement | IComponent | undefined>

      The elements to refresh translations inside

    Returns void

registerDataHost

  • registerDataHost(id: string | number, host: any): void
  • Registers an object as a "data host", which allows its fields to be saved to saveData or saveDataGlobal

    Parameters

    • id: string | number
    • host: any

    Returns void

reloadStylesheets

  • reloadStylesheets(): void
  • Returns void

removeStylesheet

  • removeStylesheet(path: string): void
  • Parameters

    • path: string

    Returns void

setDialogOpacity

  • setDialogOpacity(opacity?: number, save?: boolean): void
  • Parameters

    • Default value opacity: number = saveDataGlobal.options.dialogOpacity * 100
    • Default value save: boolean = true

      Whether or not to save the new scale into options. Defaults to true.

    Returns void

shouldShowMoreInformation

  • shouldShowMoreInformation(): any
  • Returns any

showLoadingInterrupt

storeElements

  • storeElements(...elements: Array<HTMLElement | IComponent>): void
  • Parameters

    • Rest ...elements: Array<HTMLElement | IComponent>

    Returns void

toggleDeveloperMode

  • toggleDeveloperMode(enabled: boolean): this
  • Parameters

    • enabled: boolean

    Returns this

toggleFullscreen

  • toggleFullscreen(): void
  • toggleFullscreen(fullscreen?: undefined | false | true): void
  • Toggles fullscreen

    Returns void

  • Parameters

    • Optional fullscreen: undefined | false | true

      Whether or not fullscreen is enabled

    Returns void

toggleShowMoreInformation

  • toggleShowMoreInformation(showMoreInformation: boolean): void
  • Parameters

    • showMoreInformation: boolean

    Returns void

updateFontStyle

  • updateFontStyle(): void
  • Returns void

updateUIAnimations

  • updateUIAnimations(): void
  • Returns void

updateUIOpacity

  • updateUIOpacity(): void
  • Returns void

Generated using TypeDoc