• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    Input

    The 'Input' class provides an interface to gather information from various external inputs. 'Input' works like a monitoring station, keeping track of user actions and triggering responses within the game. Each of these properties contain events that are fired when the corresponding action is performed, and game developers can add listeners to these events to trigger custom game logic.

    Properties

    LongPressBegan

    ClientOnly
    ReadOnly

    LongPressContinue

    ClientOnly
    ReadOnly

    LongPressEnded

    ClientOnly
    ReadOnly

    MouseWheel

    ClientOnly
    ReadOnly

    The 'MouseWheel' property listens for movements of the mouse wheel. This input allows interactions like zooming in or out or scrolling through menus, especially on platforms with a mouse device. See Class.MouseWheel for more details on the parameter of the event.

    PinchOrDragBegan

    ClientOnly
    ReadOnly

    The 'PinchOrDragBegan' property listens for the beginning of pinch or drag gestures on a touch screen. Such gestures are common in mobile UI for operations like zooming or moving objects and can be leveraged effectively in game controls. See Class.PinchGestureBegan for more details on the parameter of the event.

    PinchOrDragChanged

    ClientOnly
    ReadOnly

    The 'PinchOrDragChanged' property fires an event whenever there is a change in an ongoing pinch or drag gesture on the touch screen. This allows the game to continuously track such gestures and make corresponding adjustments in its state. See Class.PinchGestureChanged for more details on the parameter of the event.

    PinchOrDragEnded

    ClientOnly
    ReadOnly

    The 'PinchOrDragEnded' property listens for the end of a pinch or drag gesture on a touch screen. This allows the game to know precisely when such a gesture ends and probably trigger appropriate actions thereafter. See Class.PinchGestureEnded for more details on the parameter of the event.

    Tapped

    ClientOnly
    ReadOnly

    client

    ClientOnly
    ReadOnly

    inputPanel

    IPanel
    ClientOnly

    isAltPressed

    boolean
    ClientOnly
    ReadOnly

    The 'IsAltPressed' property indicates if the Alt key is currently being pressed on the keyboard. This can be useful for creating keyboard shortcuts or alternate modes within the game.

    isMouseInput

    boolean
    ClientOnly
    ReadOnly

    The 'IsMouseInput' property helps to detect whether a mouse device is providing input. false == touch input

    Updated 12 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.