Constructor Summary
| Public Constructor | ||
| public |
constructor(root: GameRoot, param0: object) |
|
Member Summary
| Public Members | ||
| public get |
allBuildings: Array<typeof MetaBuilding>: undefined[] Returns all buildings |
|
| public |
buildingHandles: Object.<string, { metaBuilding: MetaBuilding, unlocked: boolean, selected: boolean, element: HTMLElement, index: number }> |
|
| public |
domAttach: * |
|
| public |
element: * |
|
| public |
|
|
| public |
|
|
| public |
layer: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
createElements(parent: HTMLElement) Should create all require elements |
|
| public |
Cycles through all buildings |
|
| public |
|
|
| public |
onSelectedPlacementBuildingChanged(metaBuilding: MetaBuilding) Called when the selected building got changed |
|
| public |
selectBuildingForPlacement(metaBuilding: MetaBuilding): * |
|
| public |
update() Updates the toolbar |
|
Inherited Summary
| From class BaseHUDPart | ||
| public |
|
|
| public |
root: * |
|
| public |
cleanup() 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 |
drawOverlays(parameters: DrawParameters) Should draw any overlays (screen space) |
|
| public |
forwardGameSpeedKeybindings(sourceMapper: KeyActionMapper) Forwards the game speed keybindings so you can toggle pause / Fastforward in the building tooltip and such |
|
| public |
forwardMapMovementKeybindings(sourceMapper: KeyActionMapper) 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 Constructors
public constructor(root: GameRoot, param0: object) source
Override:
BaseHUDPart#constructorPublic Members
public buildingHandles: Object.<string, { metaBuilding: MetaBuilding, unlocked: boolean, selected: boolean, element: HTMLElement, index: number }> source
public domAttach: * source
public element: * source
public htmlElementId: * source
public layer: * source
public primaryBuildings: * source
public secondaryBuildings: * source
public secondaryDomAttach: * source
public visibilityCondition: * source
Public Methods
public createElements(parent: HTMLElement) source
Should create all require elements
Override:
BaseHUDPart#createElementsParams:
| Name | Type | Attribute | Description |
| parent | HTMLElement |
public initialize() source
Should initialize the element, called after the elements have been created
Override:
BaseHUDPart#initializepublic onSelectedPlacementBuildingChanged(metaBuilding: MetaBuilding) source
Called when the selected building got changed
Params:
| Name | Type | Attribute | Description |
| metaBuilding | MetaBuilding |
public selectBuildingForPlacement(metaBuilding: MetaBuilding): * source
Params:
| Name | Type | Attribute | Description |
| metaBuilding | MetaBuilding |
Return:
| * |
