ShopScreenFunctions
Hierarchy
- Omit<Partial<ScreenFunctions>, Draw>
- ShopScreenFunctions
Index
Properties
Coords
Mode
A set of shop modes for which the screen functions must be active
Methods
optionalClick
Called if the user clicks on the canvas
Parameters
event: MouseEvent | TouchEvent
The event that triggered this
Returns void
Draw
Parameters
rest...coords: RectTuple
Returns void
optionalExit
Called when user presses Esc
Returns void
optionalKeyDown
Called if the the user presses any key
Parameters
event: KeyboardEvent
The event that triggered this
Returns boolean
optionalKeyUp
Called if the user releases a pressed key
Parameters
event: KeyboardEvent
The event that triggered this
Returns void
optionalLoad
Called when screen is loaded using
CommonSetScreen
Returns void
optionalMouseDown
Called if the user presses the mouse button or touches the touchscreen on the canvas
Parameters
event: MouseEvent | TouchEvent
The event that triggered this
Returns void
optionalMouseMove
Called if the user moves the mouse cursor or the touch on the touchscreen over the canvas
Parameters
event: MouseEvent | TouchEvent
The event that triggered this
Returns void
optionalMouseUp
Called if the user releases the mouse button or the touchscreen on the canvas
Parameters
event: MouseEvent | TouchEvent
The event that triggered this
Returns void
optionalMouseWheel
Called if the user moves the mouse wheel on the canvas
Parameters
event: WheelEvent
The event that triggered this
Returns void
optionalResize
Called when screen size or position changes or after screen load
Parameters
load: boolean
If the reason for call was load (
true
) or window resize (false
)
Returns void
optionalRun
Called each frame
Parameters
time: number
The current time for frame
Returns void
optionalUnload
Called when this screen is being replaced
Returns void
Coordinates associated with a particular to-be drawn/clicked element