WebInput

Package: Libraries.Game · Inherits from: Libraries.Game.GameInput, Libraries.Game.StandardInput, Libraries.Language.Object

This class automatically handles input and notifies event listeners for Games running in web browsers. Most users shouldn't need access to this class. For users who want to test input themselves at specific times, use an InputMonitor instead.

Actions

InitializeGestureProcessor(text containerID)

Parameters

  • containerID text

WouldUseScroll(number x, number y, integer amount)

This action returns whether this game would use a mouse wheel turn at a point in its window. The web page asks this while the game doesn't have the keyboard focus, so a wheel turn the game wouldn't use scrolls the page instead. Most users shouldn't need to use this action directly.

Parameters

  • x number: The pointer's x position in the window, in pixels from the left.
  • y number: The pointer's y position in the window, in pixels from the bottom.
  • amount integer: Positive for a turn toward the top, negative for one toward the bottom.

Returns

boolean: True if an item or layer at that point would use the turn.

Inherited Actions

33 actions from Libraries.Game.GameInput
21 actions from Libraries.Game.StandardInput
3 actions from Libraries.Language.Object