Home Reference Source
import {HUDStatistics} from 'shapez.io/js/game/hud/parts/statistics.js'
public class | source

HUDStatistics

Extends:

BaseHUDPart → HUDStatistics

Member Summary

Public Members
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

sorted: *

public
public

title: *

public

Method Summary

Public Methods
public

close()

public

createElements(parent: *)

public
public

intersectionCallback(entries: *)

public
public

Chooses the next unit

public

Performs a full rerender, regenerating everything

public

Performs a partial rerender, only updating graphs and counts

public
public
public

setSorted(sorted: boolean)

public

show()

public
public

update()

Inherited Summary

From class BaseHUDPart
public
public

root: *

public

Cleans up the hud element, if overridden make sure to call super.cleanup

public

Cleans up all click detectors

public

close()

Should close the element, in case its supported

public

closeOnBackgroundClick(element: HTMLElement, closeMethod: function)

Closes this element when its background is clicked

public

createElements(parent: HTMLElement)

Should create all require elements

public

draw(parameters: DrawParameters)

Should draw the hud

public

Should draw any overlays (screen space)

public

Forwards the game speed keybindings so you can toggle pause / Fastforward in the building tooltip and such

public

Forwards the map movement keybindings so you can move the map with the arrow keys

public

Should initialize the element, called after the elements have been created

public

Should return true if this overlay is open and currently blocking any user interaction

public

Registers a new click detector

public

Should return false if the game should be paused

public

Should return true if the widget has a modal dialog opened and thus the game does not need to update / redraw

public

trackClicks(element: Element, handler: function, args: import("../../core/click_detector").ClickDetectorConstructorArgs=)

Helper method to construct a new click detector

public

update()

Should update any required logic

Public Members

public activeHandles: Object<string, HUDShapeStatisticsHandle> source

public background: * source

public closeButton: * source

public contentDiv: * source

public currentUnit: * source

public dataSource: * source

public dialogInner: * source

public displayMode: * source

public domAttach: * source

public filterHeader: * source

public filtersDataSource: * source

public filtersDisplayMode: * source

public inputReciever: * source

public intersectionObserver: * source

public keyActionMapper: * source

public lastFullRerender: number source

public lastPartialRerender: * source

public sorted: * source

public sourceExplanation: * source

public title: * source

public visible: boolean source

Public Methods

public close() source

Should close the element, in case its supported

Override:

BaseHUDPart#close

public createElements(parent: *) source

Should create all require elements

Override:

BaseHUDPart#createElements

Params:

NameTypeAttributeDescription
parent *

public initialize() source

Should initialize the element, called after the elements have been created

Override:

BaseHUDPart#initialize

public intersectionCallback(entries: *) source

Params:

NameTypeAttributeDescription
entries *

public isBlockingOverlay(): * source

Should return true if this overlay is open and currently blocking any user interaction

Override:

BaseHUDPart#isBlockingOverlay

Return:

*

public iterateUnit() source

Chooses the next unit

public rerenderFull() source

Performs a full rerender, regenerating everything

public rerenderPartial() source

Performs a partial rerender, only updating graphs and counts

public setDataSource(source: enumAnalyticsDataSource) source

Params:

NameTypeAttributeDescription
source enumAnalyticsDataSource

public setDisplayMode(mode: enumDisplayMode) source

Params:

NameTypeAttributeDescription
mode enumDisplayMode

public setSorted(sorted: boolean) source

Params:

NameTypeAttributeDescription
sorted boolean

public show() source

public toggleSorted() source

public update() source

Should update any required logic

Override:

BaseHUDPart#update