Phaser API Documentation

  Version: 
disableInteractive([resetCursor])

Description:

If this Game Object has previously been enabled for input, this will disable it.

An object that is disabled for input stops processing or being considered for input events, but can be turned back on again at any time by simply calling setInteractive() with no arguments provided.

If want to completely remove interaction from this Game Object then use removeInteractive instead.

Parameters:

name type arguments Default description
resetCursor boolean <optional> false

Should the currently active Input cursor, if any, be reset to the default cursor?

Returns:
Description:

This GameObject.

Since: 3.7.0