Skip to main content

ShopScreenFunctions

Hierarchy

Index

Properties

optionalClick

Called if the user clicks on the canvas

@param

The event that triggered this

Coords

Coords: RectTuple

Coordinates associated with a particular to-be drawn/clicked element

optionalExit

Called when user presses Esc

optionalKeyDown

Called if the the user presses any key

@param

The event that triggered this

optionalKeyUp

Called if the user releases a pressed key

@param

The event that triggered this

optionalLoad

Called when screen is loaded using CommonSetScreen

Mode

Mode: Set<ShopMode>

A set of shop modes for which the screen functions must be active

optionalMouseDown

MouseDown?: MouseEventListener

Called if the user presses the mouse button or touches the touchscreen on the canvas

@param

The event that triggered this

optionalMouseMove

MouseMove?: MouseEventListener

Called if the user moves the mouse cursor or the touch on the touchscreen over the canvas

@param

The event that triggered this

optionalMouseUp

Called if the user releases the mouse button or the touchscreen on the canvas

@param

The event that triggered this

optionalMouseWheel

Called if the user moves the mouse wheel on the canvas

@param

The event that triggered this

optionalResize

Called when screen size or position changes or after screen load

@param

If the reason for call was load (true) or window resize (false)

optionalRun

Called each frame

@param

The current time for frame

optionalUnload

Unload?: VoidHandler

Called when this screen is being replaced

Methods

Draw

  • Parameters

    Returns void