Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HUDBuildingTooltip2

Hierarchy

Index

Constructors

constructor

Methods

cleanup

  • cleanup(): void
  • Cleans up all parts

    Returns void

clearUpParts

  • clearUpParts(): void
  • CLears up all parts and bindings

    Returns void

close

  • close(): void

closeOnBackgroundClick

  • closeOnBackgroundClick(element: any, closeMethod?: any): void
  • Closes this element when its background is clicked

    Parameters

    • element: any
    • Default value closeMethod: any = null

    Returns void

closeOnOverlayOpen

  • closeOnOverlayOpen(closeMethod?: any): void
  • Calls closeMethod if an overlay is opened

    Parameters

    • Default value closeMethod: any = null

    Returns void

createElements

  • createElements(parent: any): void

draw

  • draw(parameters: any): void
  • Draws the tooltips overlays

    Parameters

    • parameters: any

    Returns void

drawOverlays

  • drawOverlays(parameters: any): void
  • Should draw any overlays (screen space)

    Parameters

    • parameters: any

    Returns void

forwardGameSpeedKeybindings

  • forwardGameSpeedKeybindings(sourceMapper: any): void
  • Forwards the game speed keybindings so you can toggle pause / Fastforward in the building tooltip and such

    Parameters

    • sourceMapper: any

    Returns void

forwardMapMovementKeybindings

  • forwardMapMovementKeybindings(sourceMapper: any): void
  • Forwards the map movement keybindings so you can move the map with the arrow keys

    Parameters

    • sourceMapper: any

    Returns void

forwardSidebarKeybindings

  • forwardSidebarKeybindings(sourceMapper: any): void
  • Forwards the game speed keybindings so you can toggle pause / Fastforward in the building tooltip and such

    Parameters

    • sourceMapper: any

    Returns void

getCurrentEntity

  • getCurrentEntity(): any

getElementId

  • getElementId(): string

getRendererInstanceByClass

  • getRendererInstanceByClass(rendererClass: any): any
  • Returns the instance of the given renderer or null

    Parameters

    • rendererClass: any

    Returns any

getScreenCameraOffset

  • getScreenCameraOffset(): Vector

getTooltipInnerHTML

  • getTooltipInnerHTML(): string

getTooltipOuterHTML

  • getTooltipOuterHTML(): string

initialize

  • initialize(): void

internalPerformSellAction

  • internalPerformSellAction(action: any): void
  • Internal sell method

    Parameters

    • action: any

      the action used to destroy / sell

    Returns void

internalRerenderHealthBar

  • internalRerenderHealthBar(): void
  • Internal helper to rerender the health bar

    Returns void

internalRerenderTitle

  • internalRerenderTitle(): void
  • Internal helper to rerender the title and health bar

    Returns void

internalUpdatePartsCount

  • internalUpdatePartsCount(): void
  • Updates the number of attached parts, used for the css layout

    Returns void

isBlockingOverlay

  • isBlockingOverlay(): boolean
  • Should return true if this overlay is open and currently blocking any user interaction

    Returns boolean

isVisible

  • isVisible(): boolean

onCanvasClick

  • onCanvasClick(screenPos: any): string

onHideTooltip

  • onHideTooltip(): void

onOpenInfo

  • onOpenInfo(): void
  • Opens the entities wiki page

    Returns void

onResync

  • onResync(): void
  • Handles a resync

    Returns void

onSelectionChanged

  • onSelectionChanged(entity: any): void
  • Handles a change in the selected entity

    Parameters

    • entity: any

    Returns void

onSelectionChangedInternal

  • onSelectionChangedInternal(): void

onShowWiki

  • onShowWiki(data: any): void
  • Callback to show the wiki dialog

    Parameters

    • data: any

    Returns void

onStructureDestroyed

  • onStructureDestroyed(structure: any): void
  • Parameters

    • structure: any

    Returns void

onStructureEnhanced

  • onStructureEnhanced(structure: any): void
  • Parameters

    • structure: any

    Returns void

onStructureUpgraded

  • onStructureUpgraded(structure: any): void
  • Parameters

    • structure: any

    Returns void

onTrySell

  • onTrySell(): void
  • Tries to sell the structure

    Returns void

registerClickDetector

  • registerClickDetector(detector: any): void
  • Registers a new click detector

    Parameters

    • detector: any

    Returns void

shouldOpenForEntity

  • shouldOpenForEntity(entity: any): boolean

shouldPauseGame

  • shouldPauseGame(): any

shouldPauseRendering

  • shouldPauseRendering(): boolean
  • Should return true if the widget has a modal dialog opened and thus the game does not need to update / redraw

    Returns boolean

trackClicks

  • trackClicks(element: any, handler: any, args?: object): void
  • Helper method to construct a new click detector

    Parameters

    • element: any

      The element to listen on

    • handler: any

      The handler to call on this object

    • Default value args: object = {}

      Click detector arguments

    Returns void

update

  • update(): void
  • Updates the tooltip

    Returns void